public class TruggerFieldHandler extends java.lang.Object implements FieldHandler
Constructor and Description |
---|
TruggerFieldHandler(java.lang.reflect.Field field)
Constructs a new handler for a static field.
|
Modifier and Type | Method and Description |
---|---|
ValueHandler |
in(java.lang.Object source)
Handles the value on a given instance (use this if the field is not
static).
|
void |
set(java.lang.Object value)
Sets the value for a static
Field . |
<E> E |
value()
Gets the value for a static
Field . |
public TruggerFieldHandler(java.lang.reflect.Field field)
field
- the field to be handledpublic <E> E value() throws HandlingException
FieldHandler
Field
.value
in interface FieldHandler
value
in interface ValueHandler
HandlingException
- if anything go wrong.public void set(java.lang.Object value) throws HandlingException
FieldHandler
Field
.set
in interface FieldHandler
set
in interface ValueHandler
value
- the value to set.HandlingException
- if anything go wrongpublic ValueHandler in(java.lang.Object source)
FieldHandler
in
in interface FieldHandler
in
in interface Result<ValueHandler,java.lang.Object>
source
- the instance. A null
value or a Class
may be
passed if the field is static.