org.enhydra.xml.xmlc.dom.generic
Class DOMBuilderGenerator
java.lang.Object
|
+--org.enhydra.xml.xmlc.dom.generic.DOMBuilderGenerator
- public class DOMBuilderGenerator
- extends Object
Class to generate code to build the document tree using only the W3C DOM
interface. The document building code is generated in several functions to
avoid the JVM limit on maximum method size. Since it is not possible to
determine the amount of bytecode generate, a metric is defined called
create-cost. A unit of create-cost is approximately the cost
to create a node and append it to it's parent. The limit on create-cost
is determined experimentally.
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PARENT_NODE_ARG
protected static final String PARENT_NODE_ARG
- Name of argument to method containing parent node.
DOCUMENT_ARG
protected static final String DOCUMENT_ARG
DOCUMENT_TYPE_VAR
protected static final String DOCUMENT_TYPE_VAR
DOMBuilderGenerator
public DOMBuilderGenerator(String methodName,
Document document,
String documentArgClassName,
NodeCreateGenerator nodeCreator,
AccessorGenerator accessorGenerator,
ElementTable elementTable,
JavaClass docClass,
int maxCreateCostPerBuildMethod,
boolean staticMethods)
throws XMLCException
- Constructor. Build the methods.
createMethodCall
public void createMethodCall(JavaCode body)
- Create a call to the top level method that was generated.
Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.