org.enhydra.xml.xmlc.compiler
Class ElementInfo

java.lang.Object
  |
  +--org.enhydra.xml.xmlc.compiler.ElementInfo

public final class ElementInfo
extends Object

Information about a particular Element. Several fields are also kept for code generators, although this is not do in a general way.


Inner Class Summary
 class ElementInfo.AccessorInfo
          Information about an accessor method (getElementXXX, getTagXXX) to create for this element.
 
Constructor Summary
ElementInfo(Element element, int nodeSize, int subTreeNodeSize, MetaData metaData, XMLCDocument xmlcDoc)
          Constructor.
 
Method Summary
 boolean createSetText()
          Should a setText method be generated for this element?
 ElementInfo.AccessorInfo[] getAccessors()
          Get the list of accessors to create.
 int getAdjustedSubTreeNodeSize()
           
 String getClassName()
          Get the Java class name of the element.
 Element getElement()
          Get the element.
 String[] getElementClassNames()
          Get the element class (attribute) names
 String getElementName()
          Get the element name (name attribute in HTML).
 String getJavaId()
          Get the Java id, or null if there isn't one.
 int getNodeSize()
           
 int getNumAccessMethods()
          Get the total number of access methods for this element.
 String getReferenceName()
          Get the reference name for this element.
 int getSubTreeNodeSize()
           
 String getXmlId()
          Get the XML id, or null if there isn't one.
 boolean hasInvalidJavaId()
          Is the element id an invalid Java identifier?
 void setAdjustedSubTreeNodeSize(int size)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementInfo

public ElementInfo(Element element,
                   int nodeSize,
                   int subTreeNodeSize,
                   MetaData metaData,
                   XMLCDocument xmlcDoc)
Constructor.
Method Detail

getElement

public Element getElement()
Get the element.

getClassName

public String getClassName()
Get the Java class name of the element.

getReferenceName

public String getReferenceName()
Get the reference name for this element. In general, this is the name of the return type for the "getElementXXX()" accessor.

getXmlId

public String getXmlId()
Get the XML id, or null if there isn't one.

getJavaId

public String getJavaId()
Get the Java id, or null if there isn't one.

getElementClassNames

public String[] getElementClassNames()
Get the element class (attribute) names

getElementName

public String getElementName()
Get the element name (name attribute in HTML).

hasInvalidJavaId

public boolean hasInvalidJavaId()
Is the element id an invalid Java identifier?

getNumAccessMethods

public int getNumAccessMethods()
Get the total number of access methods for this element.

getAccessors

public ElementInfo.AccessorInfo[] getAccessors()
Get the list of accessors to create.

createSetText

public boolean createSetText()
Should a setText method be generated for this element?

getNodeSize

public int getNodeSize()

getSubTreeNodeSize

public int getSubTreeNodeSize()

getAdjustedSubTreeNodeSize

public int getAdjustedSubTreeNodeSize()

setAdjustedSubTreeNodeSize

public void setAdjustedSubTreeNodeSize(int size)


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.