public class BeanMapEntry extends Object implements Map.Entry<String,Object>
This class can be used to get and set property values on a bean, or to get metadata on a property.
Modifier | Constructor and Description |
---|---|
protected |
BeanMapEntry(BeanMap<?> beanMap,
BeanPropertyMeta property,
String pName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
BeanMap<?> |
getBeanMap()
Returns the bean map that contains this property.
|
String |
getKey() |
BeanPropertyMeta |
getMeta()
Returns the metadata about this bean property.
|
Object |
getValue()
Returns the value of this property.
|
Object |
setValue(Object value)
Sets the value of this property.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
comparingByKey, comparingByKey, comparingByValue, comparingByValue, equals, hashCode
protected BeanMapEntry(BeanMap<?> beanMap, BeanPropertyMeta property, String pName)
beanMap
- The bean map that this entry belongs to.property
- The bean property.pName
- The bean property name.public Object getValue()
If there is a PojoSwap
associated with this bean property or bean property type class, then this method
will return the transformed value.
For example, if the bean property type class is a Date
and the bean property has the
DateSwap.ISO8601DT
swap associated with it through the
@Swap.value()
annotation, this method will return a String containing an
ISO8601 date-time string value.
public Object setValue(Object value)
If the property is an array of type X
, then the value can be a Collection<X>
or X[]
or
Object[]
.
If the property is a bean type X
, then the value can either be an X
or a Map
.
If there is a PojoSwap
associated with this bean property or bean property type class, then you must pass
in a transformed value.
For example, if the bean property type class is a Date
and the bean property has the
DateSwap.ISO8601DT
swap associated with it through the
@Swap.value()
annotation, the value being passed in must be a String
containing an ISO8601 date-time string value.
public BeanMap<?> getBeanMap()
public BeanPropertyMeta getMeta()
Copyright © 2018 Apache. All rights reserved.