public static final class TypeObjectMap.FieldHandler extends Object implements TypeObjectMap.Accessor, TypeObjectMap.Mutator
TypeObjectMap.Accessor
and TypeObjectMap.Mutator
that provides access to a
specified field using reflection. The field must be public.Constructor and Description |
---|
FieldHandler(Field field)
Creates a
TypeObjectMap.FieldHandler for the specified field. |
Modifier and Type | Method and Description |
---|---|
Object |
get(Object o)
Returns the value of the field specified in the constructor from the
specified object.
|
void |
set(Object o,
Object value)
Sets the value of the field specified in the constructor in the
specified object.
|
public FieldHandler(Field field)
TypeObjectMap.FieldHandler
for the specified field.field
- the fieldpublic Object get(Object o)
get
in interface TypeObjectMap.Accessor
o
- the objectGPUdbRuntimeException
- if the value could not be retrievedpublic void set(Object o, Object value)
set
in interface TypeObjectMap.Mutator
o
- the objectvalue
- the new value of the fieldGPUdbRuntimeException
- if the value could not be setCopyright © 2019. All rights reserved.