public abstract class AbstractPojoPropertyDescriptor extends Object implements PojoPropertyDescriptor
PojoPropertyDescriptor
interface.Modifier and Type | Field and Description |
---|---|
private Field |
field |
private String |
name |
Constructor and Description |
---|
AbstractPojoPropertyDescriptor(String propertyName)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
Field |
getField()
This method returns the
Field this descriptor represents or null if
this descriptor does not represent any field . |
String |
getName()
This method gets the programmatic (technical) name of the according property.
|
abstract PojoPropertyAccessor |
putAccessor(PojoPropertyAccessor accessor)
This method puts the given
accessor into this property-descriptor. |
void |
setField(Field field)
Sets the
Field represented by this descriptor . |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAccessor, getAccessors
public String getName()
PojoAttributeName
read
accessor
public String getFooBar()
the property name would be fooBar
.getName
in interface PojoAttributeName
FeatureDescriptor.getName()
public Field getField()
PojoPropertyDescriptor
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.getField
in interface PojoPropertyDescriptor
Field
, which is part of this PojoPropertyDescriptor
or null
if this
PojoPropertyDescriptor
is not related to a Field
public void setField(Field field)
Field
represented by this descriptor
. Necessary in case of
field
gets introspected after methods.field
- Field
represented by this descriptor
public abstract PojoPropertyAccessor putAccessor(PojoPropertyAccessor accessor)
accessor
into this property-descriptor. accessors
.accessor
- is the accessor to add.PojoPropertyAccessor
with the same mode
as the given
accessor
that has been replaced by accessor
or null
if none has been replaced.PojoPropertyDescriptor.getAccessor(net.sf.mmm.util.pojo.descriptor.api.accessor.PojoPropertyAccessorMode)
Copyright © 2001–2016 mmm-Team. All rights reserved.