org.pf.joi
Class ElementSpy

java.lang.Object
  extended by org.pf.joi.Spy
      extended by org.pf.joi.ElementSpy
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
AttributeSpy, CollectionElementSpy, MethodSpy

public abstract class ElementSpy
extends Spy
implements java.lang.Comparable

Instances of this class are holding information about the elements of an 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
ElementSpy(AbstractObjectSpy object)
          Initialize the new instance with default values.
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 int getModifiers()
          Returns the modifiers of the elements declaration.
 boolean is_Boolean_or_boolean()
          Returns true if the current value of this element spy ís of type long or Long
 boolean is_Byte_or_byte()
          Returns true if the current value of this element spy ís of type byte or Byte
 boolean is_Character_or_char()
          Returns true if the current value of this element spy ís of type char or Character
 boolean is_Double_or_double()
          Returns true if the current value of this element spy ís of type double or Double
 boolean is_Float_or_float()
          Returns true if the current value of this element spy ís of type float or Float
 boolean is_Integer_or_int()
          Returns true if the current value of this element spy ís of type int or Integer
 boolean is_Long_or_long()
          Returns true if the current value of this element spy ís of type long or Long
 boolean is_Short_or_short()
          Returns true if the current value of this element spy ís of type short or Short
 boolean isEditable()
          Currently allows to edit String values and primitive types only
 boolean isElementSpy()
          Returns true because this spy is an element spy.
 void setValue(java.lang.Object newValue)
          Sets the given object as the new value of the spy's inspected object
 
Methods inherited from class org.pf.joi.Spy
getName, getType, getTypeString, getValue, getValueComponent, getValueString, getValueTypeString, is_boolean, is_byte, is_char, is_double, is_float, is_int, is_long, is_short, isPrimitive, valueIsNull
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementSpy

public ElementSpy(AbstractObjectSpy object)
Initialize the new instance with default values.

Method Detail

isElementSpy

public boolean isElementSpy()
Returns true because this spy is an element spy.

Overrides:
isElementSpy in class Spy

getModifiers

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

Specified by:
getModifiers in class Spy
See Also:
Modifier

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

setValue

public void setValue(java.lang.Object newValue)
              throws java.lang.Exception
Sets the given object as the new value of the spy's inspected object

Overrides:
setValue in class Spy
Throws:
java.lang.Exception

isEditable

public boolean isEditable()
Currently allows to edit String values and primitive types only

Overrides:
isEditable in class Spy

is_Integer_or_int

public boolean is_Integer_or_int()
Returns true if the current value of this element spy ís of type int or Integer


is_Long_or_long

public boolean is_Long_or_long()
Returns true if the current value of this element spy ís of type long or Long


is_Short_or_short

public boolean is_Short_or_short()
Returns true if the current value of this element spy ís of type short or Short


is_Byte_or_byte

public boolean is_Byte_or_byte()
Returns true if the current value of this element spy ís of type byte or Byte


is_Float_or_float

public boolean is_Float_or_float()
Returns true if the current value of this element spy ís of type float or Float


is_Double_or_double

public boolean is_Double_or_double()
Returns true if the current value of this element spy ís of type double or Double


is_Character_or_char

public boolean is_Character_or_char()
Returns true if the current value of this element spy ís of type char or Character


is_Boolean_or_boolean

public boolean is_Boolean_or_boolean()
Returns true if the current value of this element spy ís of type long or Long