public class FieldProxy<T> extends java.lang.Object implements IValueHolder<T>
SecurityManager
is active).Constructor and Description |
---|
FieldProxy(java.lang.Object owner,
java.lang.reflect.Field field) |
FieldProxy(java.lang.Object owner,
java.lang.String fieldName) |
Modifier and Type | Method and Description |
---|---|
T |
get()
Returns the current value (might be null).
|
protected java.lang.reflect.Field |
getField() |
protected java.lang.Object |
getOwner() |
boolean |
isNull()
Returns whether or not the underlying value is null.
|
boolean |
isPresent()
Returns whether or not the underlying value is not null.
|
void |
set(T value)
Sets the current value.
|
public FieldProxy(java.lang.Object owner, java.lang.reflect.Field field)
public FieldProxy(java.lang.Object owner, java.lang.String fieldName)
public T get()
get
in interface IValueHolder<T>
public void set(T value)
set
in interface IValueHolder<T>
value
- The new value (might be null).public boolean isNull()
isNull
in interface IValueHolder<T>
public boolean isPresent()
isPresent
in interface IValueHolder<T>
protected java.lang.Object getOwner()
protected java.lang.reflect.Field getField()