Class PropertyAdapterImpl
- java.lang.Object
- 
- org.apache.tapestry5.beanmodel.internal.services.PropertyAdapterImpl
 
- 
- All Implemented Interfaces:
- AnnotationProvider,- PropertyAdapter
 
 public class PropertyAdapterImpl extends Object implements PropertyAdapter 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectget(Object instance)Reads the property value.<T extends Annotation>
 TgetAnnotation(Class<T> annotationClass)Searches for the specified annotation, returning the matching annotation instance.ClassgetBeanType()Returns the type of bean to which this property belongs.ClassPropertyAdaptergetClassAdapter()Returns theClassPropertyAdapterthat provides access to other properties defined by the same class.ClassgetDeclaringClass()The class in which the property (or public field) is defined.FieldgetField()Returns the field if the property is a public field or null if the property is accessed via the read method.StringgetName()Returns the name of the property (or public field).MethodgetReadMethod()Returns the method used to read the property, or null if the property is not readable (or is a public field).ClassgetType()Returns the type of the property.MethodgetWriteMethod()Returns the method used to update the property, or null if the property is not writeable (or a public field).booleanisCastRequired()Returns true if the return type of the read method is not the same as the property type.booleanisField()Returns true if the property is actually a public field (possibly, a public static field).booleanisRead()Returns true if the property is readable (i.e., has a getter method or is a public field).booleanisUpdate()Returns true if the property is writeable (i.e., has a setter method or is a non-final field).voidset(Object instance, Object value)Updates the property value.
 
- 
- 
- 
Method Detail- 
getNamepublic String getName() Description copied from interface:PropertyAdapterReturns the name of the property (or public field).- Specified by:
- getNamein interface- PropertyAdapter
 
 - 
getReadMethodpublic Method getReadMethod() Description copied from interface:PropertyAdapterReturns the method used to read the property, or null if the property is not readable (or is a public field).- Specified by:
- getReadMethodin interface- PropertyAdapter
 
 - 
getTypepublic Class getType() Description copied from interface:PropertyAdapterReturns the type of the property.- Specified by:
- getTypein interface- PropertyAdapter
 
 - 
getWriteMethodpublic Method getWriteMethod() Description copied from interface:PropertyAdapterReturns the method used to update the property, or null if the property is not writeable (or a public field).- Specified by:
- getWriteMethodin interface- PropertyAdapter
 
 - 
isReadpublic boolean isRead() Description copied from interface:PropertyAdapterReturns true if the property is readable (i.e., has a getter method or is a public field).- Specified by:
- isReadin interface- PropertyAdapter
 
 - 
isUpdatepublic boolean isUpdate() Description copied from interface:PropertyAdapterReturns true if the property is writeable (i.e., has a setter method or is a non-final field).- Specified by:
- isUpdatein interface- PropertyAdapter
 
 - 
getpublic Object get(Object instance) Description copied from interface:PropertyAdapterReads the property value.- Specified by:
- getin interface- PropertyAdapter
- Parameters:
- instance- to read from
 
 - 
setpublic void set(Object instance, Object value) Description copied from interface:PropertyAdapterUpdates the property value. The provided value must not be null if the property type is primitive, and must otherwise be of the proper type.- Specified by:
- setin interface- PropertyAdapter
- Parameters:
- instance- to update
- value- new value for the property
 
 - 
getAnnotationpublic <T extends Annotation> T getAnnotation(Class<T> annotationClass) Description copied from interface:AnnotationProviderSearches for the specified annotation, returning the matching annotation instance.- Specified by:
- getAnnotationin interface- AnnotationProvider
- Parameters:
- annotationClass- used to select the annotation to return
- Returns:
- the annotation, or null if not found
 
 - 
isCastRequiredpublic boolean isCastRequired() Description copied from interface:PropertyAdapterReturns true if the return type of the read method is not the same as the property type. This can occur when the property has been defined using generics, in which case, the method's type may be Object when the property type is something more specific. This method is primarily used when generating runtime code related to the property.- Specified by:
- isCastRequiredin interface- PropertyAdapter
 
 - 
getClassAdapterpublic ClassPropertyAdapter getClassAdapter() Description copied from interface:PropertyAdapterReturns theClassPropertyAdapterthat provides access to other properties defined by the same class.- Specified by:
- getClassAdapterin interface- PropertyAdapter
 
 - 
getBeanTypepublic Class getBeanType() Description copied from interface:PropertyAdapterReturns the type of bean to which this property belongs. This is the same asClassPropertyAdapter.getBeanType().- Specified by:
- getBeanTypein interface- PropertyAdapter
 
 - 
isFieldpublic boolean isField() Description copied from interface:PropertyAdapterReturns true if the property is actually a public field (possibly, a public static field).- Specified by:
- isFieldin interface- PropertyAdapter
 
 - 
getFieldpublic Field getField() Description copied from interface:PropertyAdapterReturns the field if the property is a public field or null if the property is accessed via the read method.- Specified by:
- getFieldin interface- PropertyAdapter
 
 - 
getDeclaringClasspublic Class getDeclaringClass() Description copied from interface:PropertyAdapterThe class in which the property (or public field) is defined.- Specified by:
- getDeclaringClassin interface- PropertyAdapter
 
 
- 
 
-