org.enhydra.xml.xmlc.dom.lazydom
Class LazyDOMDocBuilderGenerator
java.lang.Object
|
+--org.enhydra.xml.xmlc.dom.lazydom.LazyDOMDocBuilderGenerator
- All Implemented Interfaces:
- DocBuilderGenerator
- public class LazyDOMDocBuilderGenerator
- extends java.lang.Object
- implements DocBuilderGenerator
Class to generate code to build the document tree for the Lazy DOM.
This creates a static template DOM that is used to instantiate individual
nodes.
The static template is initialized by a set of methods to get around the
method size limitation of doing this as an array initializer.
Field Summary |
static java.lang.String |
DOCUMENT_VAR_NAME
Name for the variable holding the Document during creation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DOCUMENT_VAR_NAME
public static final java.lang.String DOCUMENT_VAR_NAME
- Name for the variable holding the Document during creation.
- See Also:
- Constant Field Values
LazyDOMDocBuilderGenerator
public LazyDOMDocBuilderGenerator()
generateDocCreateFromTemplate
public void generateDocCreateFromTemplate(Document document,
java.lang.String templateFieldName,
java.lang.String docFieldName,
JavaCode body)
- Generate code to create a document from a TemplateDOM.
- Parameters:
document
- Document that will be recreated.templateFieldName
- Name of template field.docFieldName
- Name of field for document object.
createBuildDocumentMethod
public void createBuildDocumentMethod(XMLCDocument xmlcDoc,
AccessorGenerator accessorGenerator,
ElementTable elementTable,
JavaClass docClass,
JavaMethod buildDocumentMethod)
throws XMLCException
- Generate the document builder method.
- Specified by:
createBuildDocumentMethod
in interface DocBuilderGenerator
- Parameters:
accessorGenerator
- The accessor generator for the DOM in use.elementTable
- The table of element information.docClass
- The document class being generated.buildDocumentMethod
- The buildDocument() method being generated.
XMLCException
- See Also:
DocBuilderGenerator.createBuildDocumentMethod(org.enhydra.xml.xmlc.dom.XMLCDocument, org.enhydra.xml.xmlc.dom.AccessorGenerator, org.enhydra.xml.xmlc.compiler.ElementTable, org.enhydra.xml.xmlc.codegen.JavaClass, org.enhydra.xml.xmlc.codegen.JavaMethod)