| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.apache.commons.beanutils.BeanUtilspublic class BeanUtilsextends java.lang.ObjectBeanUtilsBean.
These static utility methods use the default instance.
More sophisticated behaviour can be provided by using a BeanUtilsBean instance.
BeanUtilsBeanField Summary | |
private static int |
|
private static FastHashMap |
|
Method Summary | |
static Object |
|
static void |
|
static void |
|
static Map |
|
static String[] |
|
static int |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static void |
|
static void |
|
static void |
|
private static int debug
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.
private 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. Otherwise, the ClassNotFoundException thrown by ConvertUtils or PropertyUtils can get masked.
public static Object cloneBean(Object bean)
throws IllegalAccessException,
InstantiationException,
InvocationTargetException,
NoSuchMethodExceptionClone a bean based on the available property getters and setters, even if the bean class itself does not implement Cloneable. For more details seeBeanUtilsBean.
- See Also:
BeanUtilsBean.cloneBean(Object)
public static void copyProperties(Object dest,
Object orig)
throws IllegalAccessException,
InvocationTargetExceptionCopy property values from the origin bean to the destination bean for all cases where the property names are the same. For more details seeBeanUtilsBean.
public static void copyProperty(Object bean,
String name,
Object value)
throws IllegalAccessException,
InvocationTargetExceptionCopy the specified property value to the specified destination bean, performing any type conversion that is required. For more details seeBeanUtilsBean.
public static Map describe(Object bean)
throws IllegalAccessException,
InvocationTargetException,
NoSuchMethodExceptionReturn the entire set of properties for which the specified bean provides a read method. For more details seeBeanUtilsBean.
- See Also:
BeanUtilsBean.describe(Object)
public static String[] getArrayProperty(Object bean,
String name)
throws IllegalAccessException,
InvocationTargetException,
NoSuchMethodExceptionReturn the value of the specified array property of the specified bean, as a String array. For more details seeBeanUtilsBean.
public static int getDebug()
Deprecated. BeanUtils now uses commons-logging for all log messages. Use your favorite logging tool to configure logging for this class.
public static String getIndexedProperty(Object bean,
String name)
throws IllegalAccessException,
InvocationTargetException,
NoSuchMethodExceptionReturn the value of the specified indexed property of the specified bean, as a String. For more details seeBeanUtilsBean.
public static String getIndexedProperty(Object bean,
String name,
int index)
throws IllegalAccessException,
InvocationTargetException,
NoSuchMethodExceptionReturn the value of the specified indexed property of the specified bean, as a String. The index is specified as a method parameter and must *not* be included in the property name expression For more details seeBeanUtilsBean.
public static String getMappedProperty(Object bean,
String name)
throws IllegalAccessException,
InvocationTargetException,
NoSuchMethodExceptionReturn the value of the specified indexed property of the specified bean, as a String. For more details seeBeanUtilsBean.
public static String getMappedProperty(Object bean,
String name,
String key)
throws IllegalAccessException,
InvocationTargetException,
NoSuchMethodExceptionReturn the value of the specified mapped property of the specified bean, as a String. For more details seeBeanUtilsBean.
public static String getNestedProperty(Object bean,
String name)
throws IllegalAccessException,
InvocationTargetException,
NoSuchMethodExceptionReturn the value of the (possibly nested) property of the specified name, for the specified bean, as a String. For more details seeBeanUtilsBean.
public static String getProperty(Object bean,
String name)
throws IllegalAccessException,
InvocationTargetException,
NoSuchMethodExceptionReturn the value of the specified property of the specified bean, no matter which property reference format is used, as a String. For more details seeBeanUtilsBean.
public static String getSimpleProperty(Object bean,
String name)
throws IllegalAccessException,
InvocationTargetException,
NoSuchMethodExceptionReturn the value of the specified simple property of the specified bean, converted to a String. For more details seeBeanUtilsBean.
public static void populate(Object bean,
Map properties)
throws IllegalAccessException,
InvocationTargetExceptionPopulate the JavaBeans properties of the specified bean, based on the specified name/value pairs. For more details seeBeanUtilsBean.
- See Also:
BeanUtilsBean.populate(Object,Map)
public static void setDebug(int newDebug)
Deprecated. BeanUtils now uses commons-logging for all log messages. Use your favorite logging tool to configure logging for this class.
public static void setProperty(Object bean,
String name,
Object value)
throws IllegalAccessException,
InvocationTargetExceptionSet the specified property value, performing type conversions as required to conform to the type of the destination property. For more details seeBeanUtilsBean.