com.plumtree.openfoundation.reflect
Class XPField

java.lang.Object
  extended bycom.plumtree.openfoundation.reflect.XPField

public class XPField
extends java.lang.Object

Describes a field on a type.


Constructor Summary
XPField(java.lang.reflect.Field field)
          Constructs a XPField object.
 
Method Summary
 XPType GetFieldType()
          Gets the type/class of the field.
 java.lang.String GetName()
          Gets the field name.
 java.lang.Object GetValue(java.lang.Object obj)
          Gets the field value as an object.
 boolean IsPublic()
          Gets whether the field is public.
 boolean IsStatic()
          Gets whether the field is static.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPField

public XPField(java.lang.reflect.Field field)
Constructs a XPField object.

Parameters:
field - a java.lang.reflect.Field object
Method Detail

GetName

public java.lang.String GetName()
Gets the field name.

Returns:
the field name

GetFieldType

public XPType GetFieldType()
Gets the type/class of the field.

Returns:
the field class/type

GetValue

public java.lang.Object GetValue(java.lang.Object obj)
Gets the field value as an object. Value types will be returned wrapped.

Parameters:
obj - the instance to read the value of the field from, or null if reading a static field
Returns:
the (possibly wrapped) value

IsStatic

public boolean IsStatic()
Gets whether the field is static.

Returns:
true if and only if this is static

IsPublic

public boolean IsPublic()
Gets whether the field is public.

Returns:
true if and only if this is public


Copyright 2002, 2003, 2004 Plumtree Software Inc. All Rights Reserved.