Class DocumentDescriptor


  • public class DocumentDescriptor
    extends java.lang.Object
    This class contains informations about a document.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected class  DocumentDescriptor.Entry
      To manage collisions
    • Constructor Summary

      Constructors 
      Constructor Description
      DocumentDescriptor()
      Creates a new table.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getLocationColumn​(org.w3c.dom.Element elt)
      Returns the location column in the source file of the end element.
      int getLocationLine​(org.w3c.dom.Element elt)
      Returns the location line in the source file of the end element.
      int getNumberOfElements()
      Returns the number of elements in the document.
      protected void rehash()
      Rehash the table
      protected void removeEntry​(DocumentDescriptor.Entry e)  
      void setLocation​(org.w3c.dom.Element elt, int line, int col)
      Sets the location in the source file of the end element.
      • Methods inherited from class java.lang.Object

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

      • INITIAL_CAPACITY

        protected static final int INITIAL_CAPACITY
        The table initial capacity
        See Also:
        Constant Field Values
      • count

        protected int count
        The number of entries
    • Constructor Detail

      • DocumentDescriptor

        public DocumentDescriptor()
        Creates a new table.
    • Method Detail

      • getNumberOfElements

        public int getNumberOfElements()
        Returns the number of elements in the document.
      • getLocationLine

        public int getLocationLine​(org.w3c.dom.Element elt)
        Returns the location line in the source file of the end element.
        Returns:
        zero if the information is unknown.
      • getLocationColumn

        public int getLocationColumn​(org.w3c.dom.Element elt)
        Returns the location column in the source file of the end element.
        Returns:
        zero if the information is unknown.
      • setLocation

        public void setLocation​(org.w3c.dom.Element elt,
                                int line,
                                int col)
        Sets the location in the source file of the end element.
      • rehash

        protected void rehash()
        Rehash the table