public interface FieldHandle
| Modifier and Type | Method and Description |
|---|---|
Object |
get(Object instance)
Gets the current value of the field.
|
void |
set(Object instance,
Object newValue)
Updates the current value of the field.
|
Object get(Object instance)
NullPointerException - if the instance is nullClassCastException - if the instance is not the type that contains the fieldvoid set(Object instance, Object newValue)
NullPointerException - if the instance is nullNullPointerException - if the newValue is null and the field is a primitive typeClassCastException - if the instance is not the type that contains the fieldClassCastException - if the newValue is not assignable to the field type (or not the matching wrapper type
for a primitive field)5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.