| java.lang.Object org.apache.commons.beanutils.BeanUtilsBean org.apache.commons.beanutils.BeanUtilsBean2
BeanUtilsBean2 | public class BeanUtilsBean2 extends BeanUtilsBean (Code) | |
BeanUtilsBean implementation that creates a
ConvertUtilsBean2 and delegates conversion to
ConvertUtilsBean.convert(ObjectClass) .
To configure this implementation for the current context ClassLoader invoke
BeanUtilsBean.setInstance(new BeanUtilsBean2());
BeanUtils 1.7.0 delegated all conversion to String to the converter
registered for the String.class . One of the improvements in
BeanUtils 1.8.0 was to upgrade the
Converter implementations so
that they could handle conversion to String for their type (e.g.
IntegerConverter now handles conversion from an Integer to a String as
well as String to Integer).
In order to take advantage of these improvements BeanUtils needs to change
how it gets the appropriate
Converter . This functionality has been
implemented in the new
ConvertUtilsBean.lookup(ClassClass) and
ConvertUtilsBean.convert(ObjectClass) methods. However changing
BeanUtilsBean to use these methods could create compatibility
issues for existing users. In order to avoid that, this new
BeanUtilsBean implementation has been created (and the associated
ConvertUtilsBean2 ).
See Also: ConvertUtilsBean2 version: $Revision: 552381 $ $Date: 2007-07-02 03:00:17 +0100 (Mon, 02 Jul 2007) $ since: 1.8.0 |
BeanUtilsBean2 | public BeanUtilsBean2()(Code) | | Constructs an instance using new property
and conversion instances.
|
convert | protected Object convert(Object value, Class type)(Code) | | Convert the value to an object of the specified class (if
possible).
Parameters: value - Value to be converted (may be null) Parameters: type - Class of the value to be converted to The converted value |
Methods inherited from org.apache.commons.beanutils.BeanUtilsBean | public Object cloneBean(Object bean) throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException(Code)(Java Doc) protected Object convert(Object value, Class type)(Code)(Java Doc) public void copyProperties(Object dest, Object orig) throws IllegalAccessException, InvocationTargetException(Code)(Java Doc) public void copyProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException(Code)(Java Doc) public Map describe(Object bean) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)(Java Doc) public String[] getArrayProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)(Java Doc) public ConvertUtilsBean getConvertUtils()(Code)(Java Doc) public String getIndexedProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)(Java Doc) public String getIndexedProperty(Object bean, String name, int index) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)(Java Doc) public static BeanUtilsBean getInstance()(Code)(Java Doc) public String getMappedProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)(Java Doc) public String getMappedProperty(Object bean, String name, String key) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)(Java Doc) public String getNestedProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)(Java Doc) public String getProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)(Java Doc) public PropertyUtilsBean getPropertyUtils()(Code)(Java Doc) public String getSimpleProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)(Java Doc) public boolean initCause(Throwable throwable, Throwable cause)(Code)(Java Doc) public void populate(Object bean, Map properties) throws IllegalAccessException, InvocationTargetException(Code)(Java Doc) public static void setInstance(BeanUtilsBean newInstance)(Code)(Java Doc) public void setProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException(Code)(Java Doc)
|
|
|