站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 common API Documentation 英文版文档

FieldInstance (JBoss/Common API) - JBoss 4.0.1 sp1 common API Documentation 英文版文档


org.jboss.util
Class FieldInstance

java.lang.Object
  extended byorg.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.


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