Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.util
Class FieldInstance

    java.lang.Object
      org.jboss.util.FieldInstance

public class FieldInstance
extends Object

A `FieldInstance` refers to a specific reflected field on an object.

Version:
  `$Revision: 1.1 $`
Author:
  Jason Dillon

Field Summary
`protected Field` | `field` Field
`protected Object` | `instance` Instance

Constructor Summary
`FieldInstance(Object instance, String fieldName)` Construct a new field instance.

Method Summary
`Object` | `get()` Get the value of the field instance.
`Field` | `getField()` Get the field.
`Object` | `getInstance()` Get the instance.
`void` | `set(Object value)` Set the value of the field instance

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### field

    protected final Field field

  Field

### instance

    protected final Object instance

  Instance

Constructor Detail

### FieldInstance

    public FieldInstance(Object instance,
                         String fieldName)
                  throws NoSuchFieldException

  Construct a new field instance.

Parameters:
  `instance` - The instance object the given field belongs to.
  `fieldName` - The name of the field to find in the instance.
Throws:
  `NullArgumentException` - Instance or fieldName is `null`.
  `NoSuchFieldException`

Method Detail

### getField

    public final Field getField()

  Get the field.

  Returns:
    Field.

### getInstance

    public final Object getInstance()

  Get the instance.

  Returns:
    Instance.

### get

    public final Object get()
                     throws IllegalAccessException

  Get the value of the field instance.

  Returns:
    Field value.
  Throws:
    `IllegalAccessException` - Failed to get field value.

### set

    public final void set(Object value)
                   throws IllegalAccessException

  Set the value of the field instance

  Parameters:
    `value` - Field value.
  Throws:
    `IllegalAccessException` - Failed to set field value.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.