| java.lang.Object org.apache.commons.beanutils.WrapDynaBean org.apache.commons.beanutils.ConvertingWrapDynaBean
ConvertingWrapDynaBean | public class ConvertingWrapDynaBean extends WrapDynaBean (Code) | | 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.
author: James Strachan version: $Revision: 555824 $ $Date: 2007-07-13 01:27:15 +0100 (Fri, 13 Jul 2007) $ |
Constructor Summary | |
public | ConvertingWrapDynaBean(Object instance) Construct a new DynaBean associated with the specified
JavaBean instance. |
Method Summary | |
public void | set(String name, Object value) Set the value of the property with the specified name
performing any type conversions if necessary. |
ConvertingWrapDynaBean | public ConvertingWrapDynaBean(Object instance)(Code) | | Construct a new DynaBean associated with the specified
JavaBean instance.
Parameters: instance - JavaBean instance to be wrapped |
set | public void set(String name, Object value)(Code) | | Set the value of the property with the specified name
performing any type conversions if necessary. So this method
can accept String values for primitive numeric data types for example.
Parameters: name - Name of the property whose value is to be set Parameters: value - Value to which this property is to be set exception: IllegalArgumentException - if there are any problemscopying the property. |
|
|