org.jfree.xml.factory.objects
Class ClassFactoryCollector

java.lang.Object
  extended byorg.jfree.xml.factory.objects.ClassFactoryImpl
      extended byorg.jfree.xml.factory.objects.ClassFactoryCollector
All Implemented Interfaces:
ClassFactory

public class ClassFactoryCollector
extends ClassFactoryImpl

A class factory collector.

Author:
Thomas Morgner

Constructor Summary
ClassFactoryCollector()
          Creates a new class factory collector.
 
Method Summary
 void addFactory(ClassFactory factory)
          Adds a class factory to the collection.
 void configure(Configuration config)
          Configures this factory.
 ObjectDescription getDescriptionForClass(java.lang.Class c)
          Returns an object description for a class.
 java.util.Iterator getFactories()
          Returns an iterator the provides access to all the factories in the collection.
 java.util.Iterator getRegisteredClasses()
          Returns an iterator that provices access to the registered classes.
 ObjectDescription getSuperClassObjectDescription(java.lang.Class d, ObjectDescription knownSuperClass)
          Returns an object-description for the super class of a class.
 
Methods inherited from class org.jfree.xml.factory.objects.ClassFactoryImpl
getComparator, getConfig, registerClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassFactoryCollector

public ClassFactoryCollector()
Creates a new class factory collector.

Method Detail

addFactory

public void addFactory(ClassFactory factory)
Adds a class factory to the collection.

Parameters:
factory - the factory.

getFactories

public java.util.Iterator getFactories()
Returns an iterator the provides access to all the factories in the collection.

Returns:
The iterator.

getDescriptionForClass

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

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

getSuperClassObjectDescription

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

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

getRegisteredClasses

public java.util.Iterator getRegisteredClasses()
Returns an iterator that provices access to the registered classes.

Specified by:
getRegisteredClasses in interface ClassFactory
Overrides:
getRegisteredClasses in class ClassFactoryImpl
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:
configure in interface ClassFactory
Overrides:
configure in class ClassFactoryImpl
Parameters:
config - the configuration, never null