org.apache.commons.beanutils
public class ConvertingWrapDynaBean extends WrapDynaBean
Implementation of DynaBean
that wraps a standard JavaBean
instance, so that DynaBean APIs can be used to access its properties,
though this implementation allows type conversion to occur when properties are set.
This means that (say) Strings can be passed in as values in setter methods and
this DynaBean will convert them to the correct primitive data types.
IMPLEMENTATION NOTE - This implementation does not
support the contains()
and remove()
methods.
Version: $Revision: 926529 $ $Date: 2010-03-23 11:44:24 +0000 (Tue, 23 Mar 2010) $
Constructor Summary | |
---|---|
ConvertingWrapDynaBean(Object instance)
Construct a new DynaBean associated with the specified
JavaBean instance.
|
Method Summary | |
---|---|
void | set(String name, Object value)
Set the value of the property with the specified name
performing any type conversions if necessary. |
DynaBean
associated with the specified
JavaBean instance.
Parameters: instance JavaBean instance to be wrapped
Parameters: name Name of the property whose value is to be set value Value to which this property is to be set
Throws: IllegalArgumentException if there are any problems copying the property.