Class BIElement


  • public final class BIElement
    extends java.lang.Object
    <element> declaration in the binding file.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      CClassInfo clazz
      The bean representation for this element.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      BIAttribute attribute​(java.lang.String name)
      Gets the attribute-property declaration, if any.
      BIConversion conversion​(java.lang.String name)
      Resolves the conversion name to the conversion declaration.
      void declareConstructors​(CClassInfo src)
      Creates constructor declarations for this element.
      java.lang.String getClassName()
      Gets the JClass object that represents this declaration.
      java.util.List<BIContent> getContents()
      Iterates all content-property declarations (except 'rest').
      BIConversion getConversion()
      Gets the conversion method for this element.
      org.xml.sax.Locator getLocation()
      Gets the source location where this element is declared.
      BIContent getRest()
      Gets the 'rest' content-property declaration, if any.
      org.xml.sax.Locator getSourceLocation()
      Gets the location where this declaration is declared.
      boolean isClass()
      Checks if the element type is "class".
      boolean isRoot()
      Checks if this element is designated as a root element.
      java.lang.String name()
      Gets the element name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • clazz

        public final CClassInfo clazz
        The bean representation for this element.
    • Method Detail

      • getLocation

        public org.xml.sax.Locator getLocation()
        Gets the source location where this element is declared.
      • name

        public java.lang.String name()
        Gets the element name.
      • isClass

        public boolean isClass()
        Checks if the element type is "class". If false, that means this element will be a value.
      • isRoot

        public boolean isRoot()
        Checks if this element is designated as a root element.
      • getClassName

        public java.lang.String getClassName()
        Gets the JClass object that represents this declaration.

        This method returns null if this declaration is an element-property declaration.

      • declareConstructors

        public void declareConstructors​(CClassInfo src)
        Creates constructor declarations for this element.

        This method should only be called by DTDReader after the normalization has completed.

        Parameters:
        src - The ClassItem object that corresponds to this declaration
      • getConversion

        public BIConversion getConversion()
        Gets the conversion method for this element.

        This method can be called only when this element declaration is designated as element-value.

        Returns:
        If the convert attribute is not specified, this method returns null.
      • conversion

        public BIConversion conversion​(java.lang.String name)
        Resolves the conversion name to the conversion declaration.

        Element-local declarations are checked first.

        Returns:
        A non-null valid BIConversion object.
      • getContents

        public java.util.List<BIContent> getContents()
        Iterates all content-property declarations (except 'rest').
      • attribute

        public BIAttribute attribute​(java.lang.String name)
        Gets the attribute-property declaration, if any.
        Returns:
        null if attribute declaration was not given by that name.
      • getRest

        public BIContent getRest()
        Gets the 'rest' content-property declaration, if any.
        Returns:
        if there is no 'rest' declaration, return null.
      • getSourceLocation

        public org.xml.sax.Locator getSourceLocation()
        Gets the location where this declaration is declared.