|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PropertyAdapter
Provides access to a single property within a class. Acts as an AnnotationProvider
;
when searching for annotations, the read method (if present) is checked first, followed by the write method, followed
by the underlying field (when the property name matches the field name).
ClassPropertyAdapter
Method Summary | |
---|---|
Object |
get(Object instance)
Reads the property value. |
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. |
Class |
getDeclaringClass()
The class in which the property (or public field) is defined. |
Field |
getField()
Returns the field if the property is a public field or null if the property is accessed via the read method. |
String |
getName()
Returns the name of the property (or public field). |
Method |
getReadMethod()
Returns the method used to read the property, or null if the property is not readable (or is a public field). |
Class |
getType()
Returns the type of the property. |
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(Object instance,
Object value)
Updates the property value. |
Methods inherited from interface org.apache.tapestry5.ioc.AnnotationProvider |
---|
getAnnotation |
Method Detail |
---|
String getName()
boolean isRead()
Method getReadMethod()
boolean isUpdate()
Method getWriteMethod()
Object get(Object instance)
instance
- to read from
UnsupportedOperationException
- if the property is write onlyvoid set(Object instance, Object value)
instance
- to updatevalue
- new value for the property
UnsupportedOperationException
- if the property is read onlyClass getType()
boolean isCastRequired()
ClassPropertyAdapter getClassAdapter()
ClassPropertyAdapter
that provides access to other
properties defined by the same class.
Class getBeanType()
ClassPropertyAdapter.getBeanType()
.
boolean isField()
Field getField()
Class getDeclaringClass()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |