public class PropertyAdapterImpl extends java.lang.Object implements PropertyAdapter
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
get(java.lang.Object instance)
Reads the property value.
|
<T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<T> annotationClass)
Searches for the specified annotation, returning the matching annotation instance.
|
java.lang.Class |
getBeanType()
Returns the type of bean to which this property belongs.
|
ClassPropertyAdapter |
getClassAdapter()
Returns the
ClassPropertyAdapter that provides access to other
properties defined by the same class. |
java.lang.Class |
getDeclaringClass()
The class in which the property (or public field) is defined.
|
java.lang.reflect.Field |
getField()
Returns the field if the property is a public field or null if the property is accessed via the read method.
|
java.lang.String |
getName()
Returns the name of the property (or public field).
|
java.lang.reflect.Method |
getReadMethod()
Returns the method used to read the property, or null if the property is not readable (or is a public field).
|
java.lang.Class |
getType()
Returns the type of the property.
|
java.lang.reflect.Method |
getWriteMethod()
Returns the method used to update the property, or null if the property is not writeable (or a public field).
|
boolean |
isCastRequired()
Returns true if the return type of the read method is not the same as the property type.
|
boolean |
isField()
Returns true if the property is actually a public field (possibly, a public static field).
|
boolean |
isRead()
Returns true if the property is readable (i.e., has a getter method or is a public field).
|
boolean |
isUpdate()
Returns true if the property is writeable (i.e., has a setter method or is a non-final field).
|
void |
set(java.lang.Object instance,
java.lang.Object value)
Updates the property value.
|
public java.lang.String getName()
PropertyAdaptergetName in interface PropertyAdapterpublic java.lang.reflect.Method getReadMethod()
PropertyAdaptergetReadMethod in interface PropertyAdapterpublic java.lang.Class getType()
PropertyAdaptergetType in interface PropertyAdapterpublic java.lang.reflect.Method getWriteMethod()
PropertyAdaptergetWriteMethod in interface PropertyAdapterpublic boolean isRead()
PropertyAdapterisRead in interface PropertyAdapterpublic boolean isUpdate()
PropertyAdapterisUpdate in interface PropertyAdapterpublic java.lang.Object get(java.lang.Object instance)
PropertyAdapterget in interface PropertyAdapterinstance - to read frompublic void set(java.lang.Object instance, java.lang.Object value)
PropertyAdapterset in interface PropertyAdapterinstance - to updatevalue - new value for the propertypublic <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
AnnotationProvidergetAnnotation in interface AnnotationProviderannotationClass - used to select the annotation to returnpublic boolean isCastRequired()
PropertyAdapterisCastRequired in interface PropertyAdapterpublic ClassPropertyAdapter getClassAdapter()
PropertyAdapterClassPropertyAdapter that provides access to other
properties defined by the same class.getClassAdapter in interface PropertyAdapterpublic java.lang.Class getBeanType()
PropertyAdapterClassPropertyAdapter.getBeanType().getBeanType in interface PropertyAdapterpublic boolean isField()
PropertyAdapterisField in interface PropertyAdapterpublic java.lang.reflect.Field getField()
PropertyAdaptergetField in interface PropertyAdapterpublic java.lang.Class getDeclaringClass()
PropertyAdaptergetDeclaringClass in interface PropertyAdapter${project.version} - Copyright © 2003-2015 The Apache Software Foundation.