|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jfree.xml.util.AbstractModelReader
org.jfree.xml.util.ObjectFactoryLoader
public class ObjectFactoryLoader
The object factory loader loads the xml specification for the generic handlers. The specification may be distributed over multiple files.
This class provides the model management for the reader and writer. The instantiation of the handlers is done elsewhere.
| Constructor Summary | |
|---|---|
ObjectFactoryLoader(java.net.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(java.lang.Class c)
Returns a factory instance for the given class. |
ManualMappingDefinition |
getManualMappingDefinition(java.lang.Class c)
Returns the manual mapping definition for the given class, or null, if not manual definition exists. |
MultiplexMappingDefinition |
getMultiplexDefinition(java.lang.Class c)
Returns the multiplex definition for the given class, or null, if no such definition exists. |
protected void |
handleAttributeDefinition(java.lang.String name,
java.lang.String attribName,
java.lang.String handlerClass)
Handles an attribute definition. |
protected void |
handleConstructorDefinition(java.lang.String propertyName,
java.lang.String parameterClass)
Handles a constructor definition. |
protected void |
handleElementDefinition(java.lang.String name,
java.lang.String element)
Handles an element definition. |
protected void |
handleLookupDefinition(java.lang.String name,
java.lang.String lookupKey)
Handles an lookup definition. |
protected boolean |
handleManualMapping(java.lang.String className,
java.lang.String readHandler,
java.lang.String writeHandler)
Handles a manual mapping definition. |
protected void |
handleMultiplexMapping(java.lang.String typeName,
java.lang.String className)
Defines an entry for the multiplex mapping. |
boolean |
isGenericHandler(java.lang.Class c)
Checks, whether the factory has a description for the given class. |
protected void |
startMultiplexMapping(java.lang.String className,
java.lang.String typeAttr)
Starts a multiplex mapping. |
protected boolean |
startObjectDefinition(java.lang.String className,
java.lang.String register,
boolean ignore)
Starts a object definition. |
| Methods inherited from class org.jfree.xml.util.AbstractModelReader |
|---|
endIncludeHandling, endRootDocument, getCloseComment, getCommentHandler, getOpenComment, handleIgnoredProperty, loadClass, parseXml, parseXmlDocument, setCloseComment, setOpenComment, startIncludeHandling, startRootDocument |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectFactoryLoader(java.net.URL resourceName)
throws ObjectDescriptionException
resourceName - the URL of the initial specification file.
ObjectDescriptionException - if the file could not be parsed.| Method Detail |
|---|
protected boolean startObjectDefinition(java.lang.String className,
java.lang.String register,
boolean ignore)
throws ObjectDescriptionException
startObjectDefinition in class AbstractModelReaderclassName - the class name of the defined objectregister - the (optional) register name, to lookup and reference the object later.ignore - ignore?
ObjectDescriptionException - if an unexpected error occured.
protected void handleAttributeDefinition(java.lang.String name,
java.lang.String attribName,
java.lang.String handlerClass)
throws ObjectDescriptionException
handleAttributeDefinition in class AbstractModelReadername - the name of the propertyattribName - the xml-attribute name to use later.handlerClass - the attribute handler class.
ObjectDescriptionException - if an error occured.
protected void handleElementDefinition(java.lang.String name,
java.lang.String element)
throws ObjectDescriptionException
handleElementDefinition in class AbstractModelReadername - the name of the propertyelement - the xml-tag name for the child element.
ObjectDescriptionException - if an error occurs.
protected void handleLookupDefinition(java.lang.String name,
java.lang.String lookupKey)
throws ObjectDescriptionException
handleLookupDefinition in class AbstractModelReadername - the property name of the base objectlookupKey - the register key of the referenced object
ObjectDescriptionException - if an error occured.
protected void endObjectDefinition()
throws ObjectDescriptionException
endObjectDefinition in class AbstractModelReaderObjectDescriptionException - if an error occures.
protected void handleConstructorDefinition(java.lang.String propertyName,
java.lang.String parameterClass)
handleConstructorDefinition in class AbstractModelReaderpropertyName - the property name of the referenced local propertyparameterClass - the parameter class for the parameter.
protected boolean handleManualMapping(java.lang.String className,
java.lang.String readHandler,
java.lang.String writeHandler)
throws ObjectDescriptionException
handleManualMapping in class AbstractModelReaderclassName - the base class namereadHandler - the class name of the read handlerwriteHandler - the class name of the write handler
ObjectDescriptionException - if an unexpected error occured.
protected void startMultiplexMapping(java.lang.String className,
java.lang.String typeAttr)
startMultiplexMapping in class AbstractModelReaderclassName - the base class nametypeAttr - the xml-attribute name containing the mapping key
protected void handleMultiplexMapping(java.lang.String typeName,
java.lang.String className)
throws ObjectDescriptionException
typename and
will resolve to the handler for the given classname.
handleMultiplexMapping in class AbstractModelReadertypeName - the type value for this mapping.className - the class name to which this mapping resolves.
ObjectDescriptionException - if an error occurs.
protected void endMultiplexMapping()
throws ObjectDescriptionException
endMultiplexMapping in class AbstractModelReaderObjectDescriptionException - if an error occurs.public boolean isGenericHandler(java.lang.Class c)
isGenericHandler in interface ObjectFactoryc - the class to be handled by the factory.
public GenericObjectFactory getFactoryForClass(java.lang.Class c)
getFactoryForClass in interface ObjectFactoryc - the class
public ManualMappingDefinition getManualMappingDefinition(java.lang.Class c)
getManualMappingDefinition in interface ObjectFactoryc - the class for which to check the existence of the definition
public MultiplexMappingDefinition getMultiplexDefinition(java.lang.Class c)
getMultiplexDefinition in interface ObjectFactoryc - the class for which to check the existence of the multiplexer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||