org.pf.joi
Class CollectionElementSpy

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

public class CollectionElementSpy
extends ElementSpy

Superclass for spys that hold information about collection elements.

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
CollectionElementSpy(AbstractObjectSpy container, java.lang.Object object)
          Initialize the new instance with default values.
CollectionElementSpy(AbstractObjectSpy container, java.lang.String name, java.lang.Object object)
          Initialize the new instance with default values.
 
Method Summary
 int getModifiers()
          Returns the modifiers of the elements declaration.
 java.lang.String getName()
          Returns the name of the inspected object
 java.lang.Object getObject()
           
 java.lang.Class getType()
          Returns the type of the entry values, which by default Object.
 java.lang.Object getValue()
          Returns the object that is wrapped by this array element holder.
 void setModifiers(int newValue)
           
 
Methods inherited from class org.pf.joi.ElementSpy
compareTo, 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, isEditable, isElementSpy, setValue
 
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, isPrimitive, valueIsNull
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionElementSpy

public CollectionElementSpy(AbstractObjectSpy container,
                            java.lang.String name,
                            java.lang.Object object)
Initialize the new instance with default values.


CollectionElementSpy

public CollectionElementSpy(AbstractObjectSpy container,
                            java.lang.Object object)
Initialize the new instance with default values.

Method Detail

getObject

public java.lang.Object getObject()

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

setModifiers

public void setModifiers(int newValue)

getValue

public java.lang.Object getValue()
                          throws java.lang.Exception
Returns the object that is wrapped by this array element holder.

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

getType

public java.lang.Class getType()
Returns the type of the entry values, which by default Object. Subclasses may override this.

Specified by:
getType in class Spy