Class Overview
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.
Summary
Public Methods |
void
|
set(String name, Object value)
Set the value of the property with the specified name
performing any type conversions if necessary.
|
[Expand]
Inherited Methods |
From class
org.apache.commons.beanutils.WrapDynaBean
boolean
|
contains(String name, String key)
Does the specified mapped property contain a value for the specified
key value?
|
Object
|
get(String name)
Return the value of a simple property with the specified name.
|
Object
|
get(String name, int index)
Return the value of an indexed property with the specified name.
|
Object
|
get(String name, String key)
Return the value of a mapped property with the specified name,
or null if there is no value for the specified key.
|
DynaClass
|
getDynaClass()
Return the DynaClass instance that describes the set of
properties available for this DynaBean.
|
DynaProperty
|
getDynaProperty(String name)
Return the property descriptor for the specified property name.
|
Object
|
getInstance()
Gets the bean instance wrapped by this DynaBean.
|
void
|
remove(String name, String key)
Remove any existing value for the specified key on the
specified mapped property.
|
void
|
set(String name, String key, Object value)
Set the value of a mapped property with the specified name.
|
void
|
set(String name, int index, Object value)
Set the value of an indexed property with the specified name.
|
void
|
set(String name, Object value)
Set the value of a simple property with the specified name.
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.apache.commons.beanutils.DynaBean
abstract
boolean
|
contains(String name, String key)
Does the specified mapped property contain a value for the specified
key value?
|
abstract
Object
|
get(String name)
Return the value of a simple property with the specified name.
|
abstract
Object
|
get(String name, int index)
Return the value of an indexed property with the specified name.
|
abstract
Object
|
get(String name, String key)
Return the value of a mapped property with the specified name,
or null if there is no value for the specified key.
|
abstract
DynaClass
|
getDynaClass()
Return the DynaClass instance that describes the set of
properties available for this DynaBean.
|
abstract
void
|
remove(String name, String key)
Remove any existing value for the specified key on the
specified mapped property.
|
abstract
void
|
set(String name, String key, Object value)
Set the value of a mapped property with the specified name.
|
abstract
void
|
set(String name, int index, Object value)
Set the value of an indexed property with the specified name.
|
abstract
void
|
set(String name, Object value)
Set the value of a simple property with the specified name.
|
|
Public Constructors
public
ConvertingWrapDynaBean
(Object instance)
Construct a new DynaBean
associated with the specified
JavaBean instance.
Parameters
instance
| JavaBean instance to be wrapped
|
Public Methods
public
void
set
(String name, Object value)
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 |
value
| Value to which this property is to be set |