|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.jxpath.util.ValueUtils
Collection and property access utilities.
Constructor Summary | |
ValueUtils()
|
Method Summary | |
static java.lang.Object |
expandCollection(java.lang.Object collection,
int size)
Grows the collection if necessary to the specified size. |
static java.lang.reflect.Method |
getAccessibleMethod(java.lang.reflect.Method method)
Return an accessible method (that is, one that can be invoked via reflection) that implements the specified Method. |
static int |
getCollectionHint(java.lang.Class clazz)
Returns 1 if the type is a collection, -1 if it is definitely not and 0 if it may be a collection in some cases. |
static DynamicPropertyHandler |
getDynamicPropertyHandler(java.lang.Class clazz)
Returns a shared instance of the dynamic property handler class returned by getDynamicPropertyHandlerClass() . |
static int |
getLength(java.lang.Object collection)
Returns the length of the supplied collection. |
static java.lang.Object |
getValue(java.lang.Object collection,
int index)
Returns the index'th element of the supplied collection. |
static java.lang.Object |
getValue(java.lang.Object bean,
java.beans.PropertyDescriptor propertyDescriptor)
Returns the value of the bean's property represented by the supplied property descriptor. |
static java.lang.Object |
getValue(java.lang.Object bean,
java.beans.PropertyDescriptor propertyDescriptor,
int index)
Returns the index'th element of the bean's property represented by the supplied property descriptor. |
static boolean |
isCollection(java.lang.Object value)
Returns true if the object is an array or a Collection |
static java.util.Iterator |
iterate(java.lang.Object collection)
Returns an iterator for the supplied collection. |
static java.lang.Object |
remove(java.lang.Object collection,
int index)
Returns the index'th element from the supplied collection. |
static void |
setValue(java.lang.Object collection,
int index,
java.lang.Object value)
Modifies the index'th element of the supplied collection. |
static void |
setValue(java.lang.Object bean,
java.beans.PropertyDescriptor propertyDescriptor,
int index,
java.lang.Object value)
Modifies the index'th element of the bean's property represented by the supplied property descriptor. |
static void |
setValue(java.lang.Object bean,
java.beans.PropertyDescriptor propertyDescriptor,
java.lang.Object value)
Modifies the value of the bean's property represented by the supplied property descriptor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ValueUtils()
Method Detail |
public static boolean isCollection(java.lang.Object value)
public static int getCollectionHint(java.lang.Class clazz)
public static int getLength(java.lang.Object collection)
public static java.util.Iterator iterate(java.lang.Object collection)
public static java.lang.Object expandCollection(java.lang.Object collection, int size)
public static java.lang.Object remove(java.lang.Object collection, int index)
public static java.lang.Object getValue(java.lang.Object collection, int index)
public static void setValue(java.lang.Object collection, int index, java.lang.Object value)
public static java.lang.Object getValue(java.lang.Object bean, java.beans.PropertyDescriptor propertyDescriptor)
public static void setValue(java.lang.Object bean, java.beans.PropertyDescriptor propertyDescriptor, java.lang.Object value)
public static java.lang.Object getValue(java.lang.Object bean, java.beans.PropertyDescriptor propertyDescriptor, int index)
public static void setValue(java.lang.Object bean, java.beans.PropertyDescriptor propertyDescriptor, int index, java.lang.Object value)
public static DynamicPropertyHandler getDynamicPropertyHandler(java.lang.Class clazz)
getDynamicPropertyHandlerClass()
.public static java.lang.reflect.Method getAccessibleMethod(java.lang.reflect.Method method)
null
.method
- The method that we wish to call
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |