public class ClassPropertyAdapterImpl extends java.lang.Object implements ClassPropertyAdapter
| Constructor and Description |
|---|
ClassPropertyAdapterImpl(java.lang.Class beanType,
java.util.List<java.beans.PropertyDescriptor> descriptors) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
get(java.lang.Object instance,
java.lang.String propertyName)
Reads the value of a property.
|
java.lang.annotation.Annotation |
getAnnotation(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.Class |
getBeanType()
Returns the type of bean this adapter provides properties for.
|
PropertyAdapter |
getPropertyAdapter(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.
|
void |
set(java.lang.Object instance,
java.lang.String propertyName,
java.lang.Object value)
Updates the value of a property.
|
java.lang.String |
toString() |
public ClassPropertyAdapterImpl(java.lang.Class beanType, java.util.List<java.beans.PropertyDescriptor> descriptors)
public java.lang.Class getBeanType()
ClassPropertyAdaptergetBeanType in interface ClassPropertyAdapterpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.List<java.lang.String> getPropertyNames()
ClassPropertyAdaptergetPropertyNames in interface ClassPropertyAdapterpublic PropertyAdapter getPropertyAdapter(java.lang.String name)
ClassPropertyAdaptergetPropertyAdapter in interface ClassPropertyAdaptername - of the property (case is ignored)public java.lang.Object get(java.lang.Object instance, java.lang.String propertyName)
ClassPropertyAdapterget in interface ClassPropertyAdapterinstance - the object to read a value frompropertyName - the name of the property to read (case is ignored)public void set(java.lang.Object instance, java.lang.String propertyName, java.lang.Object value)
ClassPropertyAdapterset in interface ClassPropertyAdapterinstance - the object to updatepropertyName - the name of the property to update (case is ignored)public java.lang.annotation.Annotation getAnnotation(java.lang.Object instance, java.lang.String propertyName, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
ClassPropertyAdaptergetAnnotation in interface ClassPropertyAdapterinstance - the object to read a value frompropertyName - the name of the property to read (case is ignored)annotationClass - the type of annotation to return${project.version} - Copyright © 2003-2015 The Apache Software Foundation.