public class PropertyAccessImpl extends Object implements PropertyAccess
| Constructor and Description |
|---|
PropertyAccessImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache()
Clears the cache of adapters and asks the
Introspector to clear its cache. |
Object |
get(Object instance,
String propertyName)
Reads the value of a property.
|
ClassPropertyAdapter |
getAdapter(Class forClass)
Returns the adapter used to access properties within the indicated class.
|
ClassPropertyAdapter |
getAdapter(Object instance)
Returns the adapter for a particular object instance.
|
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.
|
void |
set(Object instance,
String propertyName,
Object value)
Updates the value of a property.
|
public PropertyAccessImpl()
public Object get(Object instance, String propertyName)
PropertyAccessget in interface PropertyAccesspublic void set(Object instance, String propertyName, Object value)
PropertyAccessset in interface PropertyAccesspublic Annotation getAnnotation(Object instance, String propertyName, Class<? extends Annotation> annotationClass)
PropertyAccessPropertyAccess.getAdapter(Object).ClassPropertyAdapter.getPropertyAdapter(String).AnnotationProvider.getAnnotation(Class)getAnnotation in interface PropertyAccessinstance - the object to read a value frompropertyName - the name of the property to read (case is ignored)annotationClass - the type of annotation to returnpublic void clearCache()
Introspector to clear its cache.clearCache in interface PropertyAccesspublic ClassPropertyAdapter getAdapter(Object instance)
PropertyAccessPropertyAccess.getAdapter(Class).getAdapter in interface PropertyAccesspublic ClassPropertyAdapter getAdapter(Class forClass)
PropertyAccessgetAdapter in interface PropertyAccess5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.