|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.xml.xmlc.dom.generic.GenericAccessorGenerator
Generate access methods for a DOM only using the W3C DOM. Many methods in the class are protected so it can be used as a base for other AccessorGenerator classes.
Constructor Summary | |
GenericAccessorGenerator()
|
Method Summary | |
void |
createAccessMethodInit(ElementInfo elementInfo,
java.lang.String elementVarName,
JavaCode body)
Create code to setup an access method for an element when building the DOM. |
JavaMethod |
createAccessorMethod(ElementInfo elementInfo,
ElementInfo.AccessorInfo accessor,
boolean createDelegation,
JavaClass docClass)
Create an element accessor method (getElementXXX() or getTextXXX()). |
void |
createNullElementAccess(ElementInfo elementInfo,
JavaCode body)
Create code cached information so that element access methods return null. |
void |
createResetElementAccess(ElementInfo elementInfo,
java.lang.String nodeVarName,
JavaCode body)
Create code to reset the element access information from a node. |
JavaMethod |
createSetTextMethod(ElementInfo elementInfo,
boolean createDelegation,
JavaClass docClass)
Create the setText method for an element. |
protected java.lang.String |
getElementField(ElementInfo elementInfo)
Get the name of the field that will store an element. |
protected JavaMethod |
setupGetElementMethod(ElementInfo elementInfo,
ElementInfo.AccessorInfo accessor,
boolean createDelegation,
JavaClass docClass)
Set up a accessor (getElementXXX or getTagXXX) method object for an element. |
protected JavaMethod |
setupSetTextMethod(ElementInfo elementInfo,
boolean createDelegation,
JavaClass docClass)
Setup the setText method for an element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GenericAccessorGenerator()
Method Detail |
protected java.lang.String getElementField(ElementInfo elementInfo)
public void createAccessMethodInit(ElementInfo elementInfo, java.lang.String elementVarName, JavaCode body)
createAccessMethodInit
in interface AccessorGenerator
elementInfo
- Information about the element.elementVarName
- The name of a variable that will contain
the element during document construction at the point that
the element is created. The type of the variable will be Element.body
- Append creation code to this code in the document builder
that is being generated.AccessorGenerator.createAccessMethodInit(org.enhydra.xml.xmlc.compiler.ElementInfo, java.lang.String, org.enhydra.xml.xmlc.codegen.JavaCode)
public void createNullElementAccess(ElementInfo elementInfo, JavaCode body)
createNullElementAccess
in interface AccessorGenerator
elementInfo
- Information about the element.body
- Append creation code to this code in the document builder
that is being generated.AccessorGenerator.createNullElementAccess(org.enhydra.xml.xmlc.compiler.ElementInfo, org.enhydra.xml.xmlc.codegen.JavaCode)
public void createResetElementAccess(ElementInfo elementInfo, java.lang.String nodeVarName, JavaCode body)
createResetElementAccess
in interface AccessorGenerator
elementInfo
- Information about the element.nodeVarName
- The name of the variable that will contain
element. It will be of type Node, so it must be cast.body
- Append creation code to this code in the document builder
that is being generated.AccessorGenerator.createResetElementAccess(org.enhydra.xml.xmlc.compiler.ElementInfo, java.lang.String, org.enhydra.xml.xmlc.codegen.JavaCode)
protected JavaMethod setupGetElementMethod(ElementInfo elementInfo, ElementInfo.AccessorInfo accessor, boolean createDelegation, JavaClass docClass)
public JavaMethod createAccessorMethod(ElementInfo elementInfo, ElementInfo.AccessorInfo accessor, boolean createDelegation, JavaClass docClass)
createAccessorMethod
in interface AccessorGenerator
elementInfo
- Information about the element.accessor
- Infomation about the accessor to create.createDelegation
- Should delegation support be created?docClass
- The document class that is being generated.
The method is added to this class.
AccessorGenerator.createAccessorMethod(org.enhydra.xml.xmlc.compiler.ElementInfo, org.enhydra.xml.xmlc.compiler.ElementInfo.AccessorInfo, boolean, org.enhydra.xml.xmlc.codegen.JavaClass)
protected JavaMethod setupSetTextMethod(ElementInfo elementInfo, boolean createDelegation, JavaClass docClass)
public JavaMethod createSetTextMethod(ElementInfo elementInfo, boolean createDelegation, JavaClass docClass)
createSetTextMethod
in interface AccessorGenerator
elementInfo
- Information about the element.createDelegation
- Should delegation support be created?docClass
- The document class that is being generated.
The method is added to this class.
AccessorGenerator#createGetElementMethod
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |