public class FieldReaderWriter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected FieldMember |
theField |
protected TypeDescriptor |
typeDescriptor
The type descriptor for the type that defines the field we want to access
|
| Modifier | Constructor and Description |
|---|---|
protected |
FieldReaderWriter() |
|
FieldReaderWriter(FieldMember theField,
TypeDescriptor typeDescriptor) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getStaticFieldValue(java.lang.Class<?> clazz,
SSMgr stateManager) |
java.lang.Object |
getValue(java.lang.Object instance,
ISMgr stateManager)
Return the value of the field for which is reader-writer exists.
|
boolean |
isStatic() |
void |
setStaticFieldValue(java.lang.Class<?> clazz,
java.lang.Object newValue,
SSMgr stateManager) |
void |
setValue(java.lang.Object instance,
java.lang.Object newValue,
ISMgr stateManager)
Set the value of an instance field on the specified instance to the specified value.
|
protected TypeDescriptor typeDescriptor
protected FieldMember theField
public FieldReaderWriter(FieldMember theField, TypeDescriptor typeDescriptor)
protected FieldReaderWriter()
public void setValue(java.lang.Object instance,
java.lang.Object newValue,
ISMgr stateManager)
throws java.lang.IllegalAccessException
instance - the object instance upon which to set the fieldnewValue - the new value for that fieldstateManager - the optional state manager for this instance, which will be looked up (expensive) if not
passed injava.lang.IllegalAccessException - if the field value cannot be setpublic void setStaticFieldValue(java.lang.Class<?> clazz,
java.lang.Object newValue,
SSMgr stateManager)
throws java.lang.IllegalAccessException
java.lang.IllegalAccessExceptionpublic java.lang.Object getValue(java.lang.Object instance,
ISMgr stateManager)
throws java.lang.IllegalAccessException,
java.lang.IllegalArgumentException
instance - the instance for which the field should be fetchedstateManager - an optional state manager containing the map of values (will be discovered if not supplied)java.lang.IllegalAccessException - if there is a problem accessing the field valuejava.lang.IllegalArgumentExceptionpublic java.lang.Object getStaticFieldValue(java.lang.Class<?> clazz,
SSMgr stateManager)
throws java.lang.IllegalAccessException,
java.lang.IllegalArgumentException
java.lang.IllegalAccessExceptionjava.lang.IllegalArgumentExceptionpublic boolean isStatic()