Interface FieldAccessor
public interface FieldAccessor
Represents an interface for accessing a field.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FieldAccessorNoOp Accessor, does what is says: nothing. -
Method Summary
-
Field Details
-
NO_OP_ACCESSOR
NoOp Accessor, does what is says: nothing.
-
-
Method Details
-
get
Retrieve the value of a field for a particular instance.- Parameters:
instance- - the instance, or NULL for a static field.- Returns:
- The value of the field.
- Throws:
IllegalStateException- If the current security context prohibits reflection.
-
set
Set the value of a field for a particular instance.- Parameters:
instance- - the instance, or NULL for a static field.value- - the new value of the field.
-
getField
Field getField()Retrieve the underlying field.- Returns:
- The field.
-