Class PropertyAdapterImpl
java.lang.Object
org.apache.tapestry5.beanmodel.internal.services.PropertyAdapterImpl
- All Implemented Interfaces:
AnnotationProvider,PropertyAdapter
-
Method Summary
Modifier and TypeMethodDescriptionReads the property value.<T extends Annotation>
TgetAnnotation(Class<T> annotationClass) Searches for the specified annotation, returning the matching annotation instance.Returns the type of bean to which this property belongs.Returns theClassPropertyAdapterthat provides access to other properties defined by the same class.The class in which the property (or public field) is defined.getField()Returns the field if the property is a public field or null if the property is accessed via the read method.getName()Returns the name of the property (or public field).Returns the method used to read the property, or null if the property is not readable (or is a public field).getType()Returns the type of the property.Returns the method used to update the property, or null if the property is not writeable (or a public field).booleanReturns 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).voidUpdates the property value.
-
Method Details
-
getName
Description copied from interface:PropertyAdapterReturns the name of the property (or public field).- Specified by:
getNamein interfacePropertyAdapter
-
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 interfacePropertyAdapter
-
getType
Description copied from interface:PropertyAdapterReturns the type of the property.- Specified by:
getTypein interfacePropertyAdapter
-
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 interfacePropertyAdapter
-
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 interfacePropertyAdapter
-
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 interfacePropertyAdapter
-
get
Description copied from interface:PropertyAdapterReads the property value.- Specified by:
getin interfacePropertyAdapter- Parameters:
instance- to read from
-
set
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 interfacePropertyAdapter- Parameters:
instance- to updatevalue- new value for the property
-
getAnnotation
Description copied from interface:AnnotationProviderSearches for the specified annotation, returning the matching annotation instance.- Specified by:
getAnnotationin interfaceAnnotationProvider- Parameters:
annotationClass- used to select the annotation to return- Returns:
- the annotation, or null if not found
-
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 interfacePropertyAdapter
-
getClassAdapter
Description copied from interface:PropertyAdapterReturns theClassPropertyAdapterthat provides access to other properties defined by the same class.- Specified by:
getClassAdapterin interfacePropertyAdapter
-
getBeanType
Description copied from interface:PropertyAdapterReturns the type of bean to which this property belongs. This is the same asClassPropertyAdapter.getBeanType().- Specified by:
getBeanTypein interfacePropertyAdapter
-
isField
Description copied from interface:PropertyAdapterReturns true if the property is actually a public field (possibly, a public static field).- Specified by:
isFieldin interfacePropertyAdapter
-
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 interfacePropertyAdapter
-
getDeclaringClass
Description copied from interface:PropertyAdapterThe class in which the property (or public field) is defined.- Specified by:
getDeclaringClassin interfacePropertyAdapter
-