public abstract class AbstractRuntimeObjectModel extends Object implements RuntimeObjectModel
RuntimeObjectModel.| Modifier and Type | Field and Description |
|---|---|
static Set<Class<?>> |
PRIMITIVE_CLASSES
A
Set that stores all the supported primitive classes. |
static String |
TO_STRING_METHOD |
| Constructor and Description |
|---|
AbstractRuntimeObjectModel() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
collectionToString(Collection<?> col)
Deprecated.
see
ObjectModel.collectionToString(Collection) |
protected Method |
extractMethodInheritanceChain(Class type,
Method m)
Deprecated.
see
ObjectModel.findBeanMethod(Class, String) (Class, Method)} |
protected static Method |
findMethod(Class<?> cls,
String baseName)
Deprecated.
see
ObjectModel.findBeanMethod(Class, String) |
protected Collection<Object> |
fromIterator(Iterator<Object> iterator)
Deprecated.
see
ObjectModel.fromIterator(Iterator) |
protected Method |
getClassMethod(Class<?> clazz,
Method m)
Deprecated.
see
ObjectModel.findBeanMethod(Class, String) (Class, Method)} |
protected static Object |
getField(Object obj,
String property)
Deprecated.
see
ObjectModel.getField(Object, String) |
protected Object |
getIndex(Object obj,
int index)
Deprecated.
see
ObjectModel.getIndex(Object, int) |
protected Object |
getIndexSafe(List list,
int index)
Deprecated.
see
ObjectModel.getIndex(Object, int) |
protected Object |
getMapProperty(Map map,
String property)
Deprecated.
use
Map.get(Object) |
protected Object |
getObjectNoArgMethod(Object obj,
String property)
Deprecated.
see
ObjectModel.invokeBeanMethod(Object, String) |
protected Object |
getObjectProperty(Object obj,
String property)
Deprecated.
see
ObjectModel.resolveProperty(Object, Object) |
protected Object |
getProperty(Object target,
Object propertyObj) |
boolean |
isCollection(Object target)
Checks if an object is a
Collection or is backed by one. |
boolean |
isDate(Object target)
Checks if the provided object represents a date or calendar.
|
protected static boolean |
isMethodAllowed(Method method)
Deprecated.
see
ObjectModel.isMethodAllowed(Method) |
boolean |
isNumber(Object target)
Checks if the provided object represents a number or not.
|
boolean |
isPrimitive(Object obj)
Checks if the provided object represents a primitive data type or not.
|
protected String |
objectToString(Object obj)
Deprecated.
see
ObjectModel.toString(Object) |
protected Collection<Object> |
obtainCollection(Object obj)
Deprecated.
see
ObjectModel.toCollection(Object) |
Object |
resolveProperty(Object target,
Object property)
Resolve a property of a target object and return its value.
|
boolean |
toBoolean(Object object)
Convert the given object to a boolean value
|
protected boolean |
toBooleanInternal(Object obj)
Deprecated.
see
ObjectModel.toBoolean(Object) |
Collection<Object> |
toCollection(Object object)
Force the conversion of the object to a collection
|
Date |
toDate(Object object)
Convert the given object to a
Date object |
Map |
toMap(Object object)
Force the conversion of the target object to a map
|
Number |
toNumber(Object object)
Coerce the object to a numeric value
|
String |
toString(Object target)
Convert the given object to a string.
|
public static final Set<Class<?>> PRIMITIVE_CLASSES
Set that stores all the supported primitive classes.public static final String TO_STRING_METHOD
public boolean isPrimitive(Object obj)
RuntimeObjectModelisPrimitive in interface RuntimeObjectModelobj - the target objecttrue if the target is a primitive, false otherwisepublic boolean isDate(Object target)
RuntimeObjectModelisDate in interface RuntimeObjectModeltarget - the target objecttrue if the target is a date or calendar, false otherwisepublic boolean isNumber(Object target)
RuntimeObjectModelisNumber in interface RuntimeObjectModeltarget - the target objecttrue if the target is a number, false otherwisepublic boolean isCollection(Object target)
RuntimeObjectModelCollection or is backed by one.isCollection in interface RuntimeObjectModeltarget - the target objecttrue if the target is a collection or is backed by one, false otherwisepublic Object resolveProperty(Object target, Object property)
RuntimeObjectModelresolveProperty in interface RuntimeObjectModeltarget - the target objectproperty - the property to be resolvedpublic boolean toBoolean(Object object)
RuntimeObjectModeltoBoolean in interface RuntimeObjectModelobject - the target objectpublic Number toNumber(Object object)
RuntimeObjectModeltoNumber in interface RuntimeObjectModelobject - the target objectpublic Date toDate(Object object)
RuntimeObjectModelDate objecttoDate in interface RuntimeObjectModelobject - the target objectobjectpublic String toString(Object target)
RuntimeObjectModeltoString in interface RuntimeObjectModeltarget - the target objectpublic Collection<Object> toCollection(Object object)
RuntimeObjectModeltoCollection in interface RuntimeObjectModelobject - the target objectpublic Map toMap(Object object)
RuntimeObjectModeltoMap in interface RuntimeObjectModelobject - the target object@Deprecated protected Collection<Object> obtainCollection(Object obj)
ObjectModel.toCollection(Object)@Deprecated protected String objectToString(Object obj)
ObjectModel.toString(Object)@Deprecated protected String collectionToString(Collection<?> col)
ObjectModel.collectionToString(Collection)@Deprecated protected Collection<Object> fromIterator(Iterator<Object> iterator)
ObjectModel.fromIterator(Iterator)@Deprecated protected boolean toBooleanInternal(Object obj)
ObjectModel.toBoolean(Object)@Deprecated protected Object getIndex(Object obj, int index)
ObjectModel.getIndex(Object, int)@Deprecated protected Object getIndexSafe(List list, int index)
ObjectModel.getIndex(Object, int)@Deprecated protected Object getMapProperty(Map map, String property)
Map.get(Object)@Deprecated protected Object getObjectProperty(Object obj, String property)
ObjectModel.resolveProperty(Object, Object)@Deprecated protected static Object getField(Object obj, String property)
ObjectModel.getField(Object, String)@Deprecated protected Object getObjectNoArgMethod(Object obj, String property)
ObjectModel.invokeBeanMethod(Object, String)@Deprecated protected static Method findMethod(Class<?> cls, String baseName)
ObjectModel.findBeanMethod(Class, String)@Deprecated protected static boolean isMethodAllowed(Method method)
ObjectModel.isMethodAllowed(Method)@Deprecated protected Method extractMethodInheritanceChain(Class type, Method m)
ObjectModel.findBeanMethod(Class, String) (Class, Method)}@Deprecated protected Method getClassMethod(Class<?> clazz, Method m)
ObjectModel.findBeanMethod(Class, String) (Class, Method)}Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.