public class MethodHandleFieldAccess extends ReflectionFieldAccess
FieldAccess using method handles.field| Constructor and Description |
|---|
MethodHandleFieldAccess(java.lang.invoke.MethodHandles.Lookup lookup,
java.lang.reflect.Field field) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getValue(java.lang.Object instance)
Get the value of the field from the given instance.
|
void |
setValue(java.lang.Object instance,
java.lang.Object value)
Set the value of the field for the given instance.
|
getAnnotation, getModifiers, getName, getTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcastValuepublic MethodHandleFieldAccess(java.lang.invoke.MethodHandles.Lookup lookup,
java.lang.reflect.Field field)
public java.lang.Object getValue(java.lang.Object instance)
FieldAccessgetValue in interface FieldAccessgetValue in class ReflectionFieldAccessinstance - The instance to get the value fromField.get(Object)public void setValue(java.lang.Object instance,
java.lang.Object value)
FieldAccesssetValue in interface FieldAccesssetValue in class ReflectionFieldAccessinstance - The instance to set the value forvalue - The value to setField.set(Object, Object)