Package org.jfree.xml.factory.objects
Class ClassFactoryImpl
- java.lang.Object
-
- org.jfree.xml.factory.objects.ClassFactoryImpl
-
- All Implemented Interfaces:
java.io.Serializable,ClassFactory
- Direct Known Subclasses:
ClassFactoryCollector,JavaBaseClassFactory,URLClassFactory
public abstract class ClassFactoryImpl extends java.lang.Object implements ClassFactory
An abstract class that implements theClassFactoryinterface.- Author:
- Thomas Morgner.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClassFactoryImpl()Creates a new class factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Configuration config)Configures this factory.booleanequals(java.lang.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(java.lang.Class c)Returns an object-description for a class.java.util.IteratorgetRegisteredClasses()Returns an iterator that provides access to the registered object definitions.ObjectDescriptiongetSuperClassObjectDescription(java.lang.Class d, ObjectDescription knownSuperClass)Returns the most concrete object-description for the super class of a class.inthashCode()Returns a hash code.protected voidregisterClass(java.lang.Class key, ObjectDescription od)Registers an object description with the factory.
-
-
-
Constructor Detail
-
ClassFactoryImpl
public ClassFactoryImpl()
Creates a new class factory.
-
-
Method Detail
-
getComparator
public ClassComparator getComparator()
Returns the class comparator used to sort the super classes of an object.- Returns:
- the class comparator.
-
getDescriptionForClass
public ObjectDescription getDescriptionForClass(java.lang.Class c)
Returns an object-description for a class.- Specified by:
getDescriptionForClassin interfaceClassFactory- Parameters:
c- the class.- Returns:
- An object description.
-
getSuperClassObjectDescription
public ObjectDescription getSuperClassObjectDescription(java.lang.Class d, ObjectDescription knownSuperClass)
Returns the most concrete object-description for the super class of a class.- Specified by:
getSuperClassObjectDescriptionin interfaceClassFactory- Parameters:
d- the class.knownSuperClass- a known supported superclass or null, if no superclass is known yet.- Returns:
- The object description.
-
registerClass
protected void registerClass(java.lang.Class key, ObjectDescription od)
Registers an object description with the factory.- Parameters:
key- the key.od- the object description.
-
getRegisteredClasses
public java.util.Iterator getRegisteredClasses()
Returns an iterator that provides access to the registered object definitions.- Specified by:
getRegisteredClassesin interfaceClassFactory- Returns:
- The iterator.
-
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.
- Specified by:
configurein interfaceClassFactory- Parameters:
config- the configuration, never null
-
getConfig
public Configuration getConfig()
Returns the currently set configuration or null, if none was set.- Returns:
- the configuration.
-
equals
public boolean equals(java.lang.Object o)
Tests for equality.- Specified by:
equalsin interfaceClassFactory- Overrides:
equalsin classjava.lang.Object- Parameters:
o- the object to test.- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code.- Specified by:
hashCodein interfaceClassFactory- Overrides:
hashCodein classjava.lang.Object- Returns:
- A hash code.
-
-