org.jfree.xml.util
public class ObjectFactoryLoader extends AbstractModelReader implements ObjectFactory
This class provides the model management for the reader and writer. The instantiation of the handlers is done elsewhere.
Constructor Summary | |
---|---|
ObjectFactoryLoader(URL resourceName)
Creates a new object factory loader for the given base file.
|
Method Summary | |
---|---|
protected void | endMultiplexMapping()
Finializes the multiplexer mapping.
|
protected void | endObjectDefinition()
Finializes the object definition.
|
GenericObjectFactory | getFactoryForClass(Class c)
Returns a factory instance for the given class. |
ManualMappingDefinition | getManualMappingDefinition(Class c)
Returns the manual mapping definition for the given class, or null, if
not manual definition exists.
|
MultiplexMappingDefinition | getMultiplexDefinition(Class c)
Returns the multiplex definition for the given class, or null, if no
such definition exists.
|
protected void | handleAttributeDefinition(String name, String attribName, String handlerClass)
Handles an attribute definition. |
protected void | handleConstructorDefinition(String propertyName, String parameterClass)
Handles a constructor definition. |
protected void | handleElementDefinition(String name, String element)
Handles an element definition. |
protected void | handleLookupDefinition(String name, String lookupKey)
Handles an lookup definition. |
protected boolean | handleManualMapping(String className, String readHandler, String writeHandler)
Handles a manual mapping definition. |
protected void | handleMultiplexMapping(String typeName, String className)
Defines an entry for the multiplex mapping. |
boolean | isGenericHandler(Class c)
Checks, whether the factory has a description for the given class.
|
protected void | startMultiplexMapping(String className, String typeAttr)
Starts a multiplex mapping. |
protected boolean | startObjectDefinition(String className, String register, boolean ignore)
Starts a object definition. |
Parameters: resourceName the URL of the initial specification file.
Throws: ObjectDescriptionException if the file could not be parsed.
Throws: ObjectDescriptionException if an error occurs.
Throws: ObjectDescriptionException if an error occures.
Parameters: c the class
Returns: the object factory.
Parameters: c the class for which to check the existence of the definition
Returns: the manual mapping definition or null.
Parameters: c the class for which to check the existence of the multiplexer
Returns: the multiplexer for the class, or null if no multiplexer exists.
Parameters: name the name of the property attribName the xml-attribute name to use later. handlerClass the attribute handler class.
Throws: ObjectDescriptionException if an error occured.
Parameters: propertyName the property name of the referenced local property parameterClass the parameter class for the parameter.
Parameters: name the name of the property element the xml-tag name for the child element.
Throws: ObjectDescriptionException if an error occurs.
Parameters: name the property name of the base object lookupKey the register key of the referenced object
Throws: ObjectDescriptionException if an error occured.
Parameters: className the base class name readHandler the class name of the read handler writeHandler the class name of the write handler
Returns: true, if the mapping was accepted, false otherwise.
Throws: ObjectDescriptionException if an unexpected error occured.
typename
and
will resolve to the handler for the given classname.
Parameters: typeName the type value for this mapping. className the class name to which this mapping resolves.
Throws: ObjectDescriptionException if an error occurs.
Parameters: c the class to be handled by the factory.
Returns: true, if an description exists for the given class, false otherwise.
Parameters: className the base class name typeAttr the xml-attribute name containing the mapping key
Parameters: className the class name of the defined object register the (optional) register name, to lookup and reference the object later. ignore ignore?
Returns: true, if the definition was accepted, false otherwise.
Throws: ObjectDescriptionException if an unexpected error occured.