org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base
Class ArrayClassFactory

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ArrayClassFactory
All Implemented Interfaces:
Serializable, ClassFactory

public class ArrayClassFactory
extends Object
implements ClassFactory

An class that implements the ClassFactory interface to create Arrays of objects. The object descriptions are created on demand.

Author:
Thomas Morgner.
See Also:
Serialized Form

Constructor Summary
ArrayClassFactory()
          Default constructor.
 
Method Summary
 void configure(org.pentaho.reporting.libraries.base.config.Configuration config)
          Configures this factory.
 boolean equals(Object o)
          ArrayClassFactories are always equal, there is nothing that could not be equal :)
 ObjectDescription getDescriptionForClass(Class c)
          Returns an object description for a class.
 Iterator getRegisteredClasses()
          Returns an iterator for the registered classes.
 ObjectDescription getSuperClassObjectDescription(Class d, ObjectDescription knownSuperClass)
          Returns an object description for the super class of a class.
 int hashCode()
          Returns a hash code value for the object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayClassFactory

public ArrayClassFactory()
Default constructor.

Method Detail

getDescriptionForClass

public ObjectDescription getDescriptionForClass(Class c)
Returns an object description for a class.

Specified by:
getDescriptionForClass in interface ClassFactory
Parameters:
c - the class.
Returns:
The object description.

getSuperClassObjectDescription

public ObjectDescription getSuperClassObjectDescription(Class d,
                                                        ObjectDescription knownSuperClass)
Returns an object description for the super class of a class. This method always returns null.

Specified by:
getSuperClassObjectDescription in interface ClassFactory
Parameters:
d - the class.
knownSuperClass - the last known super class or null.
Returns:
The object description.

getRegisteredClasses

public Iterator getRegisteredClasses()
Returns an iterator for the registered classes. This returns a list of pre-registered classes known to this ClassFactory. A class may be able to handle more than the registered classes.

This method exists to support query tools for UI design, do not rely on it for day to day work.

Specified by:
getRegisteredClasses in interface ClassFactory
Returns:
The iterator.

configure

public void configure(org.pentaho.reporting.libraries.base.config.Configuration config)
Configures this factory. The configuration contains several keys and their defined values. The given reference to the configuration object will remain valid until the report parsing or writing ends.

The configuration contents may change during the reporting.

Specified by:
configure in interface ClassFactory
Parameters:
config - the configuration, never null

equals

public boolean equals(Object o)
ArrayClassFactories are always equal, there is nothing that could not be equal :)

Specified by:
equals in interface ClassFactory
Overrides:
equals in class Object
Parameters:
o - the other object.
Returns:
true, if both object factories describe the same objects, false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

Specified by:
hashCode in interface ClassFactory
Overrides:
hashCode in class Object
Returns:
the computed hashcode.