A wrapper that is capable to read and write object fields via getter and
setter methods or directly. The access is possible for all visibilities.
However, if the underlying object is an implementor of the interface
java.util.Map then getter and setter method access is simulated to access
entries in the Map and attribute access by name is also done by accessing
The only constraint is, that the keys in the Map are all of type String.
public java.lang.Object get(java.lang.String fieldName)
Returns the return value of the getter method of the given field name
or null in any case of reflection problem.
If the underlying object is a Map it returns the value of the entry
with the fieldName as key. If no such entry exists, null will be returned.
public void set(java.lang.String fieldName,
Invokes the setter method of the given field name and passes the
specified value as parameter to it.
If the underlying object is a Map it sets the value of the entry
with the fieldName as key. If no such entry exists, it will be created.
value - The value to be put into the attribute's 'slot'
java.lang.NoSuchFieldException - If there is no attribute with the given name
public java.lang.Object getValueOfField(java.lang.String name)
Returns the value of the field with the given field name or
null in any case of reflection error.
If the underlying object is a Map then this method returns the value
of the map entry corresponding to the given name key.
If the map does not contain the given name then null will be returned.
public void setValueOfField(java.lang.String name,
Modifies the field with the given name directly to the specified value
without calling the setter.
If the underlying object is a Map then this method sets the value
of the map entry regardless whether or not the given name key already exists.