Class ClassPropertyAdapterImpl
java.lang.Object
org.apache.tapestry5.beanmodel.internal.services.ClassPropertyAdapterImpl
- All Implemented Interfaces:
ClassPropertyAdapter
-
Constructor Summary
ConstructorsConstructorDescriptionClassPropertyAdapterImpl
(Class beanType, List<PropertyDescriptor> descriptors) -
Method Summary
Modifier and TypeMethodDescriptionReads the value of a property.getAnnotation
(Object instance, String propertyName, Class<? extends Annotation> annotationClass) Returns the annotation of a given property for the specified type if such an annotation is present, else null.Returns the type of bean this adapter provides properties for.getPropertyAdapter
(String name) Returns the property adapter with the given name, or null if no such adapter exists.Returns the names of all properties, sorted into alphabetic order.void
Updates the value of a property.toString()
-
Constructor Details
-
ClassPropertyAdapterImpl
-
-
Method Details
-
getBeanType
Description copied from interface:ClassPropertyAdapter
Returns the type of bean this adapter provides properties for.- Specified by:
getBeanType
in interfaceClassPropertyAdapter
- Returns:
- the type of the bean.
-
toString
-
getPropertyNames
Description copied from interface:ClassPropertyAdapter
Returns the names of all properties, sorted into alphabetic order. This includes true properties (as defined in the JavaBeans specification), but also public fields. Starting in Tapestry 5.3, even public static fields are included.- Specified by:
getPropertyNames
in interfaceClassPropertyAdapter
- Returns:
- the property names.
-
getPropertyAdapter
Description copied from interface:ClassPropertyAdapter
Returns the property adapter with the given name, or null if no such adapter exists.- Specified by:
getPropertyAdapter
in interfaceClassPropertyAdapter
- Parameters:
name
- of the property (case is ignored)- Returns:
- the PropertyAdapter instance associated with that property
-
get
Description copied from interface:ClassPropertyAdapter
Reads the value of a property.- Specified by:
get
in interfaceClassPropertyAdapter
- Parameters:
instance
- the object to read a value frompropertyName
- the name of the property to read (case is ignored)- Returns:
- the value
-
set
Description copied from interface:ClassPropertyAdapter
Updates the value of a property.- Specified by:
set
in interfaceClassPropertyAdapter
- Parameters:
instance
- the object to updatepropertyName
- the name of the property to update (case is ignored)value
- the value to be set
-
getAnnotation
public Annotation getAnnotation(Object instance, String propertyName, Class<? extends Annotation> annotationClass) Description copied from interface:ClassPropertyAdapter
Returns the annotation of a given property for the specified type if such an annotation is present, else null.- Specified by:
getAnnotation
in interfaceClassPropertyAdapter
- Parameters:
instance
- the object to read a value frompropertyName
- the name of the property to read (case is ignored)annotationClass
- the type of annotation to return- Returns:
- the Annotation instance
-