public interface PojoPropertyDescriptor extends PojoAttributeName
Pojo. A property is some attribute of a
Pojo that can be accessed directly via a Field or via a
Method (getter, setter, etc.). This PojoPropertyDescriptor is an alternative to
PropertyDescriptor but only has focus on reflectively accessing objects. Therefore it works on any
Pojo. | Modifier and Type | Method and Description |
|---|---|
<ACCESSOR extends PojoPropertyAccessor> |
getAccessor(PojoPropertyAccessorMode<ACCESSOR> mode)
This method gets the
accessor to access the represented property in the way given by
mode. |
Collection<? extends PojoPropertyAccessor> |
getAccessors()
This method gets all available
accessors for the represented
property. |
Field |
getField()
This method returns the
Field this descriptor represents or null if
this descriptor does not represent any field. |
getName<ACCESSOR extends PojoPropertyAccessor> ACCESSOR getAccessor(PojoPropertyAccessorMode<ACCESSOR> mode)
accessor to access the represented property in the way given by
mode.ACCESSOR - is the type of the requested accessor.mode - is the mode of the requested accessor. Use
PojoPropertyAccessorModes for available modes.mode or null if no such accessor exists.Collection<? extends PojoPropertyAccessor> getAccessors()
accessors for the represented
property.property descriptorsField getField()
Field this descriptor represents or null if
this descriptor does not represent any field. PojoPropertyAccessor.getAccessibleObject() will return the accessible object for the
according accessor. Depending on the introspection variant this will
represent the actual method or field used to access the property. Therefore if you want to evaluate annotations of
a property you should by default use PojoPropertyAccessor.getAccessibleObject() of the
getter. However, if you are
using method introspection and want to additionally access the field with the same property name if available in
the Pojo then this method is the right one.Field, which is part of this PojoPropertyDescriptor or null if this
PojoPropertyDescriptor is not related to a FieldCopyright © 2001–2016 mmm-Team. All rights reserved.