public static class Reflection.InstanceField extends Object
Constructor and Description |
---|
InstanceField(Object obj,
Field field)
Create the InstanceField.
|
Modifier and Type | Method and Description |
---|---|
Wrapper |
get() |
Wrapper |
getData()
Get the Wrapper that data will be passed to and from the field.
|
static Reflection.InstanceField |
match(Reflection.InstanceField current,
Object obj,
Field field)
If the current InstanceField matches the object and field exactly, then
return the current InstanceField.
|
boolean |
matches(Object obj,
Field field)
Returns if this InstanceField matches the Object and Field
specified.
|
void |
set() |
Reflection.InstanceField |
setData(Wrapper w)
Set the internal data wrapper to be equal to the provided wrapper.
|
Wrapper |
tryGet() |
boolean |
trySet() |
public InstanceField(Object obj, Field field) throws IllegalArgumentException, IllegalAccessException
public Wrapper getData()
public Reflection.InstanceField setData(Wrapper w)
w
- the data that will be set using set() or trySet().public boolean matches(Object obj, Field field)
public Wrapper get() throws IllegalArgumentException, IllegalAccessException
public Wrapper tryGet()
public void set() throws IllegalArgumentException, IllegalAccessException
public boolean trySet()
public static Reflection.InstanceField match(Reflection.InstanceField current, Object obj, Field field) throws IllegalArgumentException, IllegalAccessException
current
- the current InstanceField.obj
- the possibly new Object to access.field
- the possibly new Field to access.IllegalArgumentException
IllegalAccessException