public class ClassPropertyAdapterImpl extends Object implements ClassPropertyAdapter
| Constructor and Description |
|---|
ClassPropertyAdapterImpl(Class beanType,
List<PropertyDescriptor> descriptors) |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(Object instance,
String propertyName)
Reads the value of a property.
|
Annotation |
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.
|
Class |
getBeanType()
Returns the type of bean this adapter provides properties for.
|
PropertyAdapter |
getPropertyAdapter(String name)
Returns the property adapter with the given name, or null if no such adapter exists.
|
List<String> |
getPropertyNames()
Returns the names of all properties, sorted into alphabetic order.
|
void |
set(Object instance,
String propertyName,
Object value)
Updates the value of a property.
|
String |
toString() |
public ClassPropertyAdapterImpl(Class beanType, List<PropertyDescriptor> descriptors)
public Class getBeanType()
ClassPropertyAdaptergetBeanType in interface ClassPropertyAdapterpublic List<String> getPropertyNames()
ClassPropertyAdaptergetPropertyNames in interface ClassPropertyAdapterpublic PropertyAdapter getPropertyAdapter(String name)
ClassPropertyAdaptergetPropertyAdapter in interface ClassPropertyAdaptername - of the property (case is ignored)public Object get(Object instance, 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(Object instance, String propertyName, Object value)
ClassPropertyAdapterset in interface ClassPropertyAdapterinstance - the object to updatepropertyName - the name of the property to update (case is ignored)value - the value to be setpublic Annotation getAnnotation(Object instance, String propertyName, Class<? extends 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 return5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.