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