public class FieldInstance extends Object
Modifier and Type | Field and Description |
---|---|
protected Field |
field
Field
|
protected Object |
instance
Instance
|
Constructor and Description |
---|
FieldInstance(Object instance,
String fieldName)
Construct a new field instance.
|
protected final Field field
protected final Object instance
public FieldInstance(Object instance, String fieldName) throws NoSuchFieldException
instance
- The instance object the given field belongs to.fieldName
- The name of the field to find in the instance.NullArgumentException
- Instance or fieldName is null.NoSuchFieldException
public final Field getField()
public final Object getInstance()
public final Object get() throws IllegalAccessException
IllegalAccessException
- Failed to get field value.public final void set(Object value) throws IllegalAccessException
value
- Field value.IllegalAccessException
- Failed to set field value.Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.