public interface FieldAccessor
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.Object instance)
Retrieve the value of a field for a particular instance.
|
java.lang.reflect.Field |
getField()
Retrieve the underlying field.
|
void |
set(java.lang.Object instance,
java.lang.Object value)
Set the value of a field for a particular instance.
|
java.lang.Object get(java.lang.Object instance)
instance
- - the instance, or NULL for a static field.java.lang.IllegalStateException
- If the current security context prohibits reflection.void set(java.lang.Object instance, java.lang.Object value)
instance
- - the instance, or NULL for a static field.value
- - the new value of the field.java.lang.reflect.Field getField()