Class WNameTable


  • public final class WNameTable
    extends NameTable
    This is a symbol table implementation used for storing byte-based WNames.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected WNameTable​(int hashSize)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected WNameTable createChild​(WNameFactory f)  
      WName findSymbol​(java.lang.String localName)  
      WName findSymbol​(java.lang.String prefix, java.lang.String localName)
      Finds and returns name matching the specified symbol, if such name already exists in the table; or if not, creates name object, adds to the table, and returns it.
      void markAsShared()  
      boolean maybeDirty()
      Method called to check to quickly see if a child symbol table may have gotten additional entries.
      boolean mergeToParent()  
      void nuke()
      Method used by test code, to reset state of the name table.
      int size()  
      java.lang.String toDebugString()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WNameTable

        protected WNameTable​(int hashSize)
    • Method Detail

      • mergeToParent

        public boolean mergeToParent()
      • markAsShared

        public void markAsShared()
      • nuke

        public void nuke()
        Method used by test code, to reset state of the name table.
      • size

        public int size()
        Specified by:
        size in class NameTable
      • maybeDirty

        public boolean maybeDirty()
        Method called to check to quickly see if a child symbol table may have gotten additional entries. Used for checking to see if a child table should be merged into shared table.
        Specified by:
        maybeDirty in class NameTable
      • findSymbol

        public WName findSymbol​(java.lang.String localName)
                         throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • findSymbol

        public WName findSymbol​(java.lang.String prefix,
                                java.lang.String localName)
                         throws javax.xml.stream.XMLStreamException
        Finds and returns name matching the specified symbol, if such name already exists in the table; or if not, creates name object, adds to the table, and returns it.
        Throws:
        javax.xml.stream.XMLStreamException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toDebugString

        public java.lang.String toDebugString()