org.jfree.xml.writer
public abstract class RootXmlWriteHandler extends Object
Constructor Summary | |
---|---|
RootXmlWriteHandler()
Creates a new RootXmlWrite handler with the default mappings enabled. |
Method Summary | |
---|---|
protected void | addManualMapping(Class classToWrite, Class handler)
Adds a new manual mapping to this handler.
|
protected void | addMultiplexMapping(Class baseClass, String typeAttr, MultiplexMappingEntry[] mdef)
Adds a multiplex mapping.
|
protected abstract ObjectFactory | getFactoryLoader()
Returns the object factory.
|
protected XmlWriteHandler | getMapping(Class classToWrite)
Tries to find the mapping for the given class. |
protected XmlWriteHandler | loadHandlerClass(String className)
Loads the given class, and ignores all exceptions which may occur
during the loading. |
void | write(String tagName, Object object, Class baseClass, XMLWriter writer)
Writes the given object with the specified tagname. |
Parameters: classToWrite the class, which should be handled handler the write handler implementation for that class.
Parameters: baseClass the base class. typeAttr the type attribute. mdef the mapping entries.
Returns: the object factory.
Parameters: classToWrite the class for which to find a handler.
Returns: the write handler, never null.
Throws: XMLWriterException if no handler could be found for the given class.
Parameters: className the name of the class to be loaded.
Returns: the class or null.
Throws: XMLWriterException if there is a writer exception.
Parameters: tagName the tagname for the xml-element containing the object definition. The tagname must not be null. object the object which should be written. baseClass the base class. writer the xml writer used to write the content, never null.
Throws: IOException if an IOException occures. XMLWriterException if an object model related error occures during the writing.