Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.commons.beanutils.PropertyUtils
public class PropertyUtils
extends java.lang.Object
PropertyUtilsBean
.
For more details see PropertyUtilsBean
.
PropertyUtilsBean
Field Summary | |
static char |
|
static char |
|
static char |
|
static char |
|
static char |
|
private static int |
|
Method Summary | |
static void |
|
static void |
|
static Map |
|
static int |
|
static Object |
|
static Object |
|
static Object |
|
static Object |
|
static FastHashMap |
|
static FastHashMap |
|
static Object |
|
static Object |
|
static PropertyDescriptor |
|
static PropertyDescriptor[] |
|
static PropertyDescriptor[] |
|
static Class |
|
static Class |
|
static Method |
|
static Object |
|
static Method |
|
static boolean |
|
static boolean |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
public static final char INDEXED_DELIM
The delimiter that preceeds the zero-relative subscript for an indexed reference.
- Field Value:
- '['
public static final char INDEXED_DELIM2
The delimiter that follows the zero-relative subscript for an indexed reference.
- Field Value:
- ']'
public static final char MAPPED_DELIM
The delimiter that preceeds the key of a mapped property.
- Field Value:
- '('
public static final char MAPPED_DELIM2
The delimiter that follows the key of a mapped property.
- Field Value:
- ')'
public static final char NESTED_DELIM
The delimiter that separates the components of a nested reference.
- Field Value:
- '.'
private static int debug
Deprecated. The
debug
static property is no longer usedThe debugging detail level for this component.
public static void clearDescriptors()
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 seePropertyUtilsBean
.
- See Also:
PropertyUtilsBean.clearDescriptors()
public static void copyProperties(Object dest, Object orig) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Copy property values from the "origin" bean to the "destination" bean for all cases where the property names are the same (even though the actual getter and setter methods might have been customized viaBeanInfo
classes). For more details seePropertyUtilsBean
.
public static Map describe(Object bean) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Return the entire set of properties for which the specified bean provides a read method. For more details seePropertyUtilsBean
.
- See Also:
PropertyUtilsBean.describe(Object)
public static int getDebug()
Deprecated. The
debug
static property is no longer used
public static Object getIndexedProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Return the value of the specified indexed property of the specified bean, with no type conversions. For more details seePropertyUtilsBean
.
public static Object getIndexedProperty(Object bean, String name, int index) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Return the value of the specified indexed property of the specified bean, with no type conversions. For more details seePropertyUtilsBean
.
public static Object getMappedProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Return the value of the specified mapped property of the specified bean, with no type conversions. For more details seePropertyUtilsBean
.
public static Object getMappedProperty(Object bean, String name, String key) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Return the value of the specified mapped property of the specified bean, with no type conversions. For more details seePropertyUtilsBean
.
public static FastHashMap getMappedPropertyDescriptors(Class beanClass)
Deprecated. This method should not be exposed
Return the mapped property descriptors for this bean class. For more details seePropertyUtilsBean
.
public static FastHashMap getMappedPropertyDescriptors(Object bean)
Deprecated. This method should not be exposed
Return the mapped property descriptors for this bean. For more details seePropertyUtilsBean
.
public static Object getNestedProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Return the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions. For more details seePropertyUtilsBean
.
public static Object getProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Return the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions. For more details seePropertyUtilsBean
.
public static PropertyDescriptor getPropertyDescriptor(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Retrieve the property descriptor for the specified property of the specified bean, or returnnull
if there is no such descriptor. For more details seePropertyUtilsBean
.
public static PropertyDescriptor[] getPropertyDescriptors(Class beanClass)
Retrieve the property descriptors for the specified class, introspecting and caching them the first time a particular bean class is encountered. For more details seePropertyUtilsBean
.
public static PropertyDescriptor[] getPropertyDescriptors(Object bean)
Retrieve the property descriptors for the specified bean, introspecting and caching them the first time a particular bean class is encountered. For more details seePropertyUtilsBean
.
public static Class getPropertyEditorClass(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Return the Java Class repesenting the property editor class that has been registered for this property (if any). For more details seePropertyUtilsBean
.
public static Class getPropertyType(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Return the Java Class representing the property type of the specified property, ornull
if there is no such property for the specified bean. For more details seePropertyUtilsBean
.
public static Method getReadMethod(PropertyDescriptor descriptor)
Return an accessible property getter method for this property, if there is one; otherwise returnnull
. For more details seePropertyUtilsBean
.
public static Object getSimpleProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Return the value of the specified simple property of the specified bean, with no type conversions. For more details seePropertyUtilsBean
.
public static Method getWriteMethod(PropertyDescriptor descriptor)
Return an accessible property setter method for this property, if there is one; otherwise returnnull
. For more details seePropertyUtilsBean
.
public static boolean isReadable(Object bean, String name)
Returntrue
if the specified property name identifies a readable property on the specified bean; otherwise, returnfalse
. For more details seePropertyUtilsBean
.
- Since:
- BeanUtils 1.6
public static boolean isWriteable(Object bean, String name)
Returntrue
if the specified property name identifies a writeable property on the specified bean; otherwise, returnfalse
. For more details seePropertyUtilsBean
.
- Since:
- BeanUtils 1.6
public static void setDebug(int newDebug)
Deprecated. The
debug
static property is no longer used
public static void setIndexedProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Sets the value of the specified indexed property of the specified bean, with no type conversions. For more details seePropertyUtilsBean
.
public static void setIndexedProperty(Object bean, String name, int index, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Sets the value of the specified indexed property of the specified bean, with no type conversions. For more details seePropertyUtilsBean
.
public static void setMappedProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Sets the value of the specified mapped property of the specified bean, with no type conversions. For more details seePropertyUtilsBean
.
public static void setMappedProperty(Object bean, String name, String key, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Sets the value of the specified mapped property of the specified bean, with no type conversions. For more details seePropertyUtilsBean
.
public static void setNestedProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Sets the value of the (possibly nested) property of the specified name, for the specified bean, with no type conversions. For more details seePropertyUtilsBean
.
public static void setProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Set the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions. For more details seePropertyUtilsBean
.
public static void setSimpleProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Set the value of the specified simple property of the specified bean, with no type conversions. For more details seePropertyUtilsBean
.