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)
PropertyAccess
get
in interface PropertyAccess
public void set(Object instance, String propertyName, Object value)
PropertyAccess
set
in interface PropertyAccess
public Annotation getAnnotation(Object instance, String propertyName, Class<? extends Annotation> annotationClass)
PropertyAccess
PropertyAccess.getAdapter(Object)
.ClassPropertyAdapter.getPropertyAdapter(String)
.AnnotationProvider.getAnnotation(Class)
getAnnotation
in interface PropertyAccess
instance
- 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 PropertyAccess
public ClassPropertyAdapter getAdapter(Object instance)
PropertyAccess
PropertyAccess.getAdapter(Class)
.getAdapter
in interface PropertyAccess
public ClassPropertyAdapter getAdapter(Class forClass)
PropertyAccess
getAdapter
in interface PropertyAccess
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.