org.pfsw.joi
Class AttributeSpy

java.lang.Object
  extended by org.pfsw.joi.Spy
      extended by org.pfsw.joi.ElementSpy
          extended by org.pfsw.joi.AttributeSpy
All Implemented Interfaces:
java.lang.Comparable

public class AttributeSpy
extends ElementSpy

Instances of this class are holding information about the attributes of an inspected object.


Field Summary
 
Fields inherited from class org.pfsw.joi.Spy
PRIMITIVE_BOOLEAN, PRIMITIVE_BYTE, PRIMITIVE_CHAR, PRIMITIVE_DOUBLE, PRIMITIVE_FLOAT, PRIMITIVE_INT, PRIMITIVE_LONG, PRIMITIVE_SHORT, RENDERER_MAPPING_FILENAME, RENDERER_MAPPING_FILENAME_ALL, RENDERER_MAPPING_FILENAME_CLASSLOADER
 
Constructor Summary
AttributeSpy(AbstractObjectSpy object, java.lang.reflect.Field field)
          Initialize the new instance with default values.
 
Method Summary
 void beInherited()
           
protected  java.lang.Class getCurrentType()
          Returns the type of the contained element.
protected  java.lang.reflect.Field getField()
           
protected  boolean getInheritedFlag()
           
 int getModifiers()
          Returns the modifiers of the elements declaration.
 java.lang.String getName()
          Returns the name of the inspected object
 java.lang.Class getType()
          Returns the type of the held object.
 java.lang.Object getValue()
          Returns the value of the held object.
 boolean isInherited()
           
protected  void setField(java.lang.reflect.Field newValue)
           
protected  void setInheritedFlag(boolean newValue)
           
 
Methods inherited from class org.pfsw.joi.ElementSpy
compareTo, getContainer, is_Boolean_or_boolean, is_Byte_or_byte, is_Character_or_char, is_Double_or_double, is_Float_or_float, is_Integer_or_int, is_Long_or_long, is_Short_or_short, isCorrectType, isEditable, isElementSpy, modifyValue, setContainer, setValue
 
Methods inherited from class org.pfsw.joi.Spy
getRendererRegistry, getTypeString, getTypeStringOf, getValueComponent, getValueString, getValueTypeString, invokeInspectString, is_boolean, is_byte, is_char, is_double, is_float, is_int, is_long, is_short, isPrimitive, objectAsComponent, objectAsString, rendererFor, setRendererRegistry, valueIsNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeSpy

public AttributeSpy(AbstractObjectSpy object,
                    java.lang.reflect.Field field)
Initialize the new instance with default values.

Method Detail

getField

protected java.lang.reflect.Field getField()

setField

protected void setField(java.lang.reflect.Field newValue)

getInheritedFlag

protected boolean getInheritedFlag()

setInheritedFlag

protected void setInheritedFlag(boolean newValue)

getType

public java.lang.Class getType()
Description copied from class: Spy
Returns the type of the held object.

Specified by:
getType in class Spy

getName

public java.lang.String getName()
Description copied from class: Spy
Returns the name of the inspected object

Specified by:
getName in class Spy

getModifiers

public int getModifiers()
Description copied from class: ElementSpy
Returns the modifiers of the elements declaration.
The default is to simulate simple public fields. Subclasses may override this method.

Overrides:
getModifiers in class ElementSpy
See Also:
Modifier

getValue

public java.lang.Object getValue()
                          throws java.lang.Exception
Description copied from class: Spy
Returns the value of the held object.

Specified by:
getValue in class Spy
Throws:
java.lang.Exception

isInherited

public boolean isInherited()

beInherited

public void beInherited()

getCurrentType

protected java.lang.Class getCurrentType()
Returns the type of the contained element.

Overrides:
getCurrentType in class ElementSpy