| java.lang.Object org.apache.commons.beanutils.PropertyUtils
PropertyUtils | public class PropertyUtils (Code) | | Utility methods for using Java Reflection APIs to facilitate generic
property getter and setter operations on Java objects.
The implementations for these methods are provided by PropertyUtilsBean .
For more details see
PropertyUtilsBean .
author: Craig R. McClanahan author: Ralph Schaer author: Chris Audley author: Rey Francois author: Gregor Rayman author: Jan Sorensen author: Scott Sanders version: $Revision: 555845 $ $Date: 2007-07-13 03:52:05 +0100 (Fri, 13 Jul 2007) $ See Also: PropertyUtilsBean See Also: org.apache.commons.beanutils.expression.Resolver |
Field Summary | |
final public static char | INDEXED_DELIM The delimiter that preceeds the zero-relative subscript for an
indexed reference. | final public static char | INDEXED_DELIM2 The delimiter that follows the zero-relative subscript for an
indexed reference. | final public static char | MAPPED_DELIM The delimiter that preceeds the key of a mapped property. | final public static char | MAPPED_DELIM2 The delimiter that follows the key of a mapped property. | final public static char | NESTED_DELIM The delimiter that separates the components of a nested reference. |
Method Summary | |
public static void | clearDescriptors() Clear any cached property descriptors information for all classes
loaded by any class loaders. | public static void | copyProperties(Object dest, Object orig) | public static Map | describe(Object bean) | public static int | getDebug() | public static Object | getIndexedProperty(Object bean, String name) | public static Object | getIndexedProperty(Object bean, String name, int index) | public static Object | getMappedProperty(Object bean, String name) | public static Object | getMappedProperty(Object bean, String name, String key) | public static FastHashMap | getMappedPropertyDescriptors(Class beanClass) | public static FastHashMap | getMappedPropertyDescriptors(Object bean) | public static Object | getNestedProperty(Object bean, String name) | public static Object | getProperty(Object bean, String name) | public static PropertyDescriptor | getPropertyDescriptor(Object bean, String name) | public static PropertyDescriptor[] | getPropertyDescriptors(Class beanClass) | public static PropertyDescriptor[] | getPropertyDescriptors(Object bean) | public static Class | getPropertyEditorClass(Object bean, String name) | public static Class | getPropertyType(Object bean, String name) | public static Method | getReadMethod(PropertyDescriptor descriptor) | public static Object | getSimpleProperty(Object bean, String name) | public static Method | getWriteMethod(PropertyDescriptor descriptor) | public static boolean | isReadable(Object bean, String name) | public static boolean | isWriteable(Object bean, String name) | public static void | setDebug(int newDebug) | public static void | setIndexedProperty(Object bean, String name, Object value) | public static void | setIndexedProperty(Object bean, String name, int index, Object value) | public static void | setMappedProperty(Object bean, String name, Object value) | public static void | setMappedProperty(Object bean, String name, String key, Object value) | public static void | setNestedProperty(Object bean, String name, Object value) | public static void | setProperty(Object bean, String name, Object value) | public static void | setSimpleProperty(Object bean, String name, Object value) |
clearDescriptors | public static void clearDescriptors()(Code) | | Clear any cached property descriptors information for all classes
loaded by any class loaders. This is useful in cases where class
loaders are thrown away to implement class reloading.
For more details see PropertyUtilsBean .
See Also: PropertyUtilsBean.clearDescriptors See Also: |
getDebug | public static int getDebug()(Code) | | The debug static property is no longer used
debug property |
getPropertyDescriptors | public static PropertyDescriptor[] getPropertyDescriptors(Class beanClass)(Code) | | Retrieve the property descriptors for the specified class,
introspecting and caching them the first time a particular bean class
is encountered.
For more details see PropertyUtilsBean .
Parameters: beanClass - Bean class for which property descriptors are requested the property descriptors exception: IllegalArgumentException - if beanClass is null See Also: PropertyUtilsBean.getPropertyDescriptors(Class) |
getReadMethod | public static Method getReadMethod(PropertyDescriptor descriptor)(Code) | | Return an accessible property getter method for this property,
if there is one; otherwise return null .
For more details see PropertyUtilsBean .
Parameters: descriptor - Property descriptor to return a getter for The read method See Also: PropertyUtilsBean.getReadMethod |
getWriteMethod | public static Method getWriteMethod(PropertyDescriptor descriptor)(Code) | | Return an accessible property setter method for this property,
if there is one; otherwise return null .
For more details see PropertyUtilsBean .
Parameters: descriptor - Property descriptor to return a setter for The write method See Also: PropertyUtilsBean.getWriteMethod |
isReadable | public static boolean isReadable(Object bean, String name)(Code) | | Return true if the specified property name identifies
a readable property on the specified bean; otherwise, return
false .
For more details see PropertyUtilsBean .
Parameters: bean - Bean to be examined (may be a DynaBean Parameters: name - Property name to be evaluated true if the property is readable,otherwise false exception: IllegalArgumentException - if bean or name is null See Also: PropertyUtilsBean.isReadable since: BeanUtils 1.6 |
isWriteable | public static boolean isWriteable(Object bean, String name)(Code) | | Return true if the specified property name identifies
a writeable property on the specified bean; otherwise, return
false .
For more details see PropertyUtilsBean .
Parameters: bean - Bean to be examined (may be a DynaBean Parameters: name - Property name to be evaluated true if the property is writeable,otherwise false exception: IllegalArgumentException - if bean or name is null See Also: PropertyUtilsBean.isWriteable since: BeanUtils 1.6 |
setDebug | public static void setDebug(int newDebug)(Code) | | The debug static property is no longer used
Parameters: newDebug - debug property |
|
|