org.pfsw.joi
Class ObjectSpy

java.lang.Object
  extended by org.pfsw.joi.Spy
      extended by org.pfsw.joi.AbstractObjectSpy
          extended by org.pfsw.joi.ObjectSpy

public class ObjectSpy
extends AbstractObjectSpy

An instance of this class is a wrapper for one inspected object. It provides the API an inspector is using, to display internal information about the 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
ObjectSpy(java.lang.Object obj)
          Initialize the new instance with default values.
 
Method Summary
protected  void addAllElements()
           
protected  void addFields(java.lang.reflect.Field[] fields, boolean inherited)
           
protected  void addInheritedFields(java.lang.Class aClass)
           
protected  boolean allowsElementModification()
          Returns true.
protected  void setElementValue(ElementSpy element, java.lang.Object value)
          Sets the value of the specified element to the given value.
protected  AttributeSpy wrapField(java.lang.reflect.Field field)
           
 
Methods inherited from class org.pfsw.joi.AbstractObjectSpy
canBeSorted, createNewElementList, getElementFilter, getElementHolders, getElementNamed, getElements, getFullElementCount, getModifiers, getName, getObject, getType, getValue, initializeElements, setElementFilter, setElementHolders, setName, setObject, sortElements
 
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, isEditable, isElementSpy, isPrimitive, objectAsComponent, objectAsString, rendererFor, setRendererRegistry, setValue, valueIsNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectSpy

public ObjectSpy(java.lang.Object obj)
          throws java.lang.SecurityException
Initialize the new instance with default values.

Throws:
java.lang.SecurityException
Method Detail

addFields

protected void addFields(java.lang.reflect.Field[] fields,
                         boolean inherited)

addInheritedFields

protected void addInheritedFields(java.lang.Class aClass)
                           throws java.lang.SecurityException
Throws:
java.lang.SecurityException

addAllElements

protected void addAllElements()
                       throws java.lang.SecurityException
Specified by:
addAllElements in class AbstractObjectSpy
Throws:
java.lang.SecurityException

wrapField

protected AttributeSpy wrapField(java.lang.reflect.Field field)

allowsElementModification

protected boolean allowsElementModification()
Returns true. That is this object allows the modification of its elements.

Overrides:
allowsElementModification in class AbstractObjectSpy

setElementValue

protected void setElementValue(ElementSpy element,
                               java.lang.Object value)
                        throws java.lang.Exception
Sets the value of the specified element to the given value.

Overrides:
setElementValue in class AbstractObjectSpy
Throws:
java.lang.Exception