public interface PropertyAccess
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Discards all stored property access information, discarding all created class adapters.
|
java.lang.Object |
get(java.lang.Object instance,
java.lang.String propertyName)
Reads the value of a property.
|
ClassPropertyAdapter |
getAdapter(java.lang.Class forClass)
Returns the adapter used to access properties within the indicated class.
|
ClassPropertyAdapter |
getAdapter(java.lang.Object instance)
Returns the adapter for a particular object instance.
|
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.
|
void |
set(java.lang.Object instance,
java.lang.String propertyName,
java.lang.Object value)
Updates the value of a property.
|
java.lang.Object get(java.lang.Object instance, java.lang.String propertyName)
java.lang.UnsupportedOperationException
- if the property is write onlyjava.lang.IllegalArgumentException
- if property does not existvoid set(java.lang.Object instance, java.lang.String propertyName, java.lang.Object value)
java.lang.UnsupportedOperationException
- if the property is read onlyjava.lang.IllegalArgumentException
- if property does not existjava.lang.annotation.Annotation getAnnotation(java.lang.Object instance, java.lang.String propertyName, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
getAdapter(Object)
.ClassPropertyAdapter.getPropertyAdapter(String)
.AnnotationProvider.getAnnotation(Class)
instance
- the object to read a value frompropertyName
- the name of the property to read (case is ignored)annotationClass
- the type of annotation to returnjava.lang.IllegalArgumentException
- if property does not existClassPropertyAdapter getAdapter(java.lang.Object instance)
getAdapter(Class)
.ClassPropertyAdapter getAdapter(java.lang.Class forClass)
void clearCache()
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.