org.pf.joi
Class AbstractObjectSpy

java.lang.Object
  extended by org.pf.joi.Spy
      extended by org.pf.joi.AbstractObjectSpy
Direct Known Subclasses:
ArraySpy, AssociationListSpy, DictionarySpy, DynamicProxySpy, ListSpy, MapSpy, ObjectSpy, StringSpy

public abstract class AbstractObjectSpy
extends Spy

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.

Version:
1.2
Author:
Manfred Duchrow

Field Summary
 
Fields inherited from class org.pf.joi.Spy
RENDERER_MAPPING_FILENAME, RENDERER_MAPPING_FILENAME_ALL, RENDERER_MAPPING_FILENAME_CLASSLOADER
 
Constructor Summary
AbstractObjectSpy(java.lang.Object obj)
          Initialize the new instance with default values.
 
Method Summary
 ElementFilter getElementFilter()
           
 ElementSpy getElementNamed(java.lang.String elementName)
          Returns the element with the given name or null if no such element can be found in the receiver.
 java.util.List getElements()
          Returns all elements, i.e. including inherited elements as List.
 int getFullElementCount()
          Returns the number of elements ignoring all filter criteria.
 int getModifiers()
          Returns the bit mask indicating the modifiers of the class declaration.
 java.lang.String getName()
          Returns the name of the inspected object
 java.lang.Object getObject()
           
 java.lang.Class getType()
          Returns the type (class) of the underlying object.
 java.lang.Object getValue()
          Returns the value of the underlying object.
 void setElementFilter(ElementFilter aValue)
           
 void setName(java.lang.String newValue)
           
 boolean sortElements()
          Sorts all elements of the underlying object in ascending order.
 
Methods inherited from class org.pf.joi.Spy
getTypeString, getValueComponent, getValueString, getValueTypeString, is_boolean, is_byte, is_char, is_double, is_float, is_int, is_long, is_short, isEditable, isElementSpy, isPrimitive, setValue, valueIsNull
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractObjectSpy

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

Throws:
java.lang.SecurityException
Method Detail

getName

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

Specified by:
getName in class Spy

setName

public void setName(java.lang.String newValue)

getObject

public java.lang.Object getObject()

getElementFilter

public ElementFilter getElementFilter()

setElementFilter

public void setElementFilter(ElementFilter aValue)

getType

public java.lang.Class getType()
Returns the type (class) of the underlying object.

Specified by:
getType in class Spy

getValue

public java.lang.Object getValue()
                          throws java.lang.Exception
Returns the value of the underlying object.

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

getModifiers

public int getModifiers()
Returns the bit mask indicating the modifiers of the class declaration.

Specified by:
getModifiers in class Spy
See Also:
Modifier

getElements

public java.util.List getElements()
Returns all elements, i.e. including inherited elements as List.
This method is using the current filter, to filter out elements with specific modifiers.


getFullElementCount

public int getFullElementCount()
Returns the number of elements ignoring all filter criteria.


getElementNamed

public ElementSpy getElementNamed(java.lang.String elementName)
Returns the element with the given name or null if no such element can be found in the receiver.


sortElements

public boolean sortElements()
Sorts all elements of the underlying object in ascending order.