org.apache.commons.beanutils
public class BeanUtils extends Object
Utility methods for populating JavaBeans properties via reflection.
The implementations are provided by BeanUtilsBean.
These static utility methods use the default instance.
More sophisticated behaviour can be provided by using a BeanUtilsBean
instance.
Version: $Revision: 1.40 $ $Date: 2004/02/28 13:18:33 $
See Also: BeanUtilsBean
Field Summary | |
---|---|
static int | debug
The debugging detail level for this component. |
static FastHashMap | dummy
Dummy collection from the Commons Collections API, to force a
ClassNotFoundException if commons-collections.jar is not present in the
runtime classpath, and this class is the first one referenced.
|
Method Summary | |
---|---|
static Object | cloneBean(Object bean) Clone a bean based on the available property getters and setters, even if the bean class itself does not implement Cloneable. For more details see |
static void | copyProperties(Object dest, Object orig) Copy property values from the origin bean to the destination bean for all cases where the property names are the same. For more details see |
static void | copyProperty(Object bean, String name, Object value) Copy the specified property value to the specified destination bean, performing any type conversion that is required. For more details see |
static Map | describe(Object bean) Return the entire set of properties for which the specified bean provides a read method. For more details see |
static String[] | getArrayProperty(Object bean, String name) Return the value of the specified array property of the specified bean, as a String array. For more details see |
static int | getDebug() |
static String | getIndexedProperty(Object bean, String name) Return the value of the specified indexed property of the specified bean, as a String. For more details see |
static String | getIndexedProperty(Object bean, String name, int index)
Return the value of the specified indexed property of the specified
bean, as a String. |
static String | getMappedProperty(Object bean, String name)
Return the value of the specified indexed property of the specified
bean, as a String.
For more details see |
static String | getMappedProperty(Object bean, String name, String key)
Return the value of the specified mapped property of the specified
bean, as a String.
For more details see |
static String | getNestedProperty(Object bean, String name) Return the value of the (possibly nested) property of the specified name, for the specified bean, as a String. For more details see |
static String | getProperty(Object bean, String name) Return the value of the specified property of the specified bean, no matter which property reference format is used, as a String. For more details see |
static String | getSimpleProperty(Object bean, String name) Return the value of the specified simple property of the specified bean, converted to a String. For more details see |
static void | populate(Object bean, Map properties) Populate the JavaBeans properties of the specified bean, based on the specified name/value pairs. For more details see |
static void | setDebug(int newDebug) |
static void | setProperty(Object bean, String name, Object value) Set the specified property value, performing type conversions as required to conform to the type of the destination property. For more details see |
Deprecated: BeanUtils now uses commons-logging for all log messages. Use your favorite logging tool to configure logging for this class.
The debugging detail level for this component.Clone a bean based on the available property getters and setters, even if the bean class itself does not implement Cloneable.
For more details see BeanUtilsBean
.
See Also: BeanUtilsBean
Copy property values from the origin bean to the destination bean for all cases where the property names are the same.
For more details see BeanUtilsBean
.
See Also: BeanUtilsBean
Copy the specified property value to the specified destination bean, performing any type conversion that is required.
For more details see BeanUtilsBean
.
See Also: BeanUtilsBean
Return the entire set of properties for which the specified bean provides a read method.
For more details see BeanUtilsBean
.
See Also: BeanUtilsBean
Return the value of the specified array property of the specified bean, as a String array.
For more details see BeanUtilsBean
.
See Also: BeanUtilsBean
Deprecated: BeanUtils now uses commons-logging for all log messages. Use your favorite logging tool to configure logging for this class.
Return the value of the specified indexed property of the specified bean, as a String.
For more details see BeanUtilsBean
.
See Also: BeanUtilsBean
For more details see BeanUtilsBean
.
See Also: BeanUtilsBean
For more details see BeanUtilsBean
.
See Also: BeanUtilsBean
For more details see BeanUtilsBean
.
See Also: BeanUtilsBean
Return the value of the (possibly nested) property of the specified name, for the specified bean, as a String.
For more details see BeanUtilsBean
.
See Also: BeanUtilsBean
Return the value of the specified property of the specified bean, no matter which property reference format is used, as a String.
For more details see BeanUtilsBean
.
See Also: BeanUtilsBean
Return the value of the specified simple property of the specified bean, converted to a String.
For more details see BeanUtilsBean
.
See Also: BeanUtilsBean
Populate the JavaBeans properties of the specified bean, based on the specified name/value pairs.
For more details see BeanUtilsBean
.
See Also: BeanUtilsBean
Deprecated: BeanUtils now uses commons-logging for all log messages. Use your favorite logging tool to configure logging for this class.
Set the specified property value, performing type conversions as required to conform to the type of the destination property.
For more details see BeanUtilsBean
.
See Also: BeanUtilsBean