org.jfree.xml.factory.objects

Class ClassFactoryImpl

public abstract class ClassFactoryImpl extends Object implements ClassFactory

An abstract class that implements the ClassFactory interface.

Author: Thomas Morgner.

Constructor Summary
ClassFactoryImpl()
Creates a new class factory.
Method Summary
voidconfigure(Configuration config)
Configures this factory.
booleanequals(Object o)
Tests for equality.
ClassComparatorgetComparator()
Returns the class comparator used to sort the super classes of an object.
ConfigurationgetConfig()
Returns the currently set configuration or null, if none was set.
ObjectDescriptiongetDescriptionForClass(Class c)
Returns an object-description for a class.
IteratorgetRegisteredClasses()
Returns an iterator that provides access to the registered object definitions.
ObjectDescriptiongetSuperClassObjectDescription(Class d, ObjectDescription knownSuperClass)
Returns the most concrete object-description for the super class of a class.
inthashCode()
Returns a hash code.
protected voidregisterClass(Class key, ObjectDescription od)
Registers an object description with the factory.

Constructor Detail

ClassFactoryImpl

public ClassFactoryImpl()
Creates a new class factory.

Method Detail

configure

public void configure(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.

Parameters: config the configuration, never null

equals

public boolean equals(Object o)
Tests for equality.

Parameters: o the object to test.

Returns: A boolean.

getComparator

public ClassComparator getComparator()
Returns the class comparator used to sort the super classes of an object.

Returns: the class comparator.

getConfig

public Configuration getConfig()
Returns the currently set configuration or null, if none was set.

Returns: the configuration.

getDescriptionForClass

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

Parameters: c the class.

Returns: An object description.

getRegisteredClasses

public Iterator getRegisteredClasses()
Returns an iterator that provides access to the registered object definitions.

Returns: The iterator.

getSuperClassObjectDescription

public ObjectDescription getSuperClassObjectDescription(Class d, ObjectDescription knownSuperClass)
Returns the most concrete object-description for the super class of a class.

Parameters: d the class. knownSuperClass a known supported superclass or null, if no superclass is known yet.

Returns: The object description.

hashCode

public int hashCode()
Returns a hash code.

Returns: A hash code.

registerClass

protected void registerClass(Class key, ObjectDescription od)
Registers an object description with the factory.

Parameters: key the key. od the object description.