Class ClassPropertyAdapterImpl
- java.lang.Object
-
- org.apache.tapestry5.beanmodel.internal.services.ClassPropertyAdapterImpl
-
- All Implemented Interfaces:
ClassPropertyAdapter
public class ClassPropertyAdapterImpl extends java.lang.Object implements ClassPropertyAdapter
-
-
Constructor Summary
Constructors Constructor Description ClassPropertyAdapterImpl(java.lang.Class beanType, java.util.List<java.beans.PropertyDescriptor> descriptors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectget(java.lang.Object instance, java.lang.String propertyName)Reads the value of a property.java.lang.annotation.AnnotationgetAnnotation(java.lang.Object instance, java.lang.String propertyName, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)Returns the annotation of a given property for the specified type if such an annotation is present, else null.java.lang.ClassgetBeanType()Returns the type of bean this adapter provides properties for.PropertyAdaptergetPropertyAdapter(java.lang.String name)Returns the property adapter with the given name, or null if no such adapter exists.java.util.List<java.lang.String>getPropertyNames()Returns the names of all properties, sorted into alphabetic order.voidset(java.lang.Object instance, java.lang.String propertyName, java.lang.Object value)Updates the value of a property.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ClassPropertyAdapterImpl
public ClassPropertyAdapterImpl(java.lang.Class beanType, java.util.List<java.beans.PropertyDescriptor> descriptors)
-
-
Method Detail
-
getBeanType
public java.lang.Class getBeanType()
Description copied from interface:ClassPropertyAdapterReturns the type of bean this adapter provides properties for.- Specified by:
getBeanTypein interfaceClassPropertyAdapter- Returns:
- the type of the bean.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getPropertyNames
public java.util.List<java.lang.String> getPropertyNames()
Description copied from interface:ClassPropertyAdapterReturns 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:
getPropertyNamesin interfaceClassPropertyAdapter- Returns:
- the property names.
-
getPropertyAdapter
public PropertyAdapter getPropertyAdapter(java.lang.String name)
Description copied from interface:ClassPropertyAdapterReturns the property adapter with the given name, or null if no such adapter exists.- Specified by:
getPropertyAdapterin interfaceClassPropertyAdapter- Parameters:
name- of the property (case is ignored)- Returns:
- the PropertyAdapter instance associated with that property
-
get
public java.lang.Object get(java.lang.Object instance, java.lang.String propertyName)
Description copied from interface:ClassPropertyAdapterReads the value of a property.- Specified by:
getin interfaceClassPropertyAdapter- Parameters:
instance- the object to read a value frompropertyName- the name of the property to read (case is ignored)- Returns:
- the value
-
set
public void set(java.lang.Object instance, java.lang.String propertyName, java.lang.Object value)
Description copied from interface:ClassPropertyAdapterUpdates the value of a property.- Specified by:
setin 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 java.lang.annotation.Annotation getAnnotation(java.lang.Object instance, java.lang.String propertyName, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Description copied from interface:ClassPropertyAdapterReturns the annotation of a given property for the specified type if such an annotation is present, else null.- Specified by:
getAnnotationin 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
-
-