public class MapAccessor extends Object implements PropertyAccessor
PropertyAccessor
for getting and setting Map
values.Constructor and Description |
---|
MapAccessor(String key)
Constructs a new MapAccessor.
|
Modifier and Type | Method and Description |
---|---|
int |
getConstructorArgumentIndex()
Returns the constructor argument index, or -1 if this property is
not a constructor argument.
|
Object |
getValue(Object bean)
Returns the property value from a bean object.
|
boolean |
isConstructorArgument()
Returns whether this property is a constructor argument.
|
void |
setValue(Object bean,
Object value)
Sets the property value on a bean object.
|
public MapAccessor(String key)
key
- the key used to get and set a value from a Map beanpublic Object getValue(Object bean)
PropertyAccessor
getValue
in interface PropertyAccessor
bean
- the bean object to get the property frompublic void setValue(Object bean, Object value)
PropertyAccessor
setValue
in interface PropertyAccessor
bean
- the bean object to set the propertyvalue
- the property valuepublic boolean isConstructorArgument()
PropertyAccessor
isConstructorArgument
in interface PropertyAccessor
public int getConstructorArgumentIndex()
PropertyAccessor
getConstructorArgumentIndex
in interface PropertyAccessor