Package com.fasterxml.aalto.out
Class WNameTable
- java.lang.Object
-
- com.fasterxml.aalto.util.NameTable
-
- com.fasterxml.aalto.out.WNameTable
-
public final class WNameTable extends NameTable
This is a symbol table implementation used for storing byte-basedWNames.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWNameTable(int hashSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected WNameTablecreateChild(WNameFactory f)WNamefindSymbol(java.lang.String localName)WNamefindSymbol(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.voidmarkAsShared()booleanmaybeDirty()Method called to check to quickly see if a child symbol table may have gotten additional entries.booleanmergeToParent()voidnuke()Method used by test code, to reset state of the name table.intsize()java.lang.StringtoDebugString()java.lang.StringtoString()
-
-
-
Method Detail
-
createChild
protected WNameTable createChild(WNameFactory f)
-
mergeToParent
public boolean mergeToParent()
-
markAsShared
public void markAsShared()
-
nuke
public void nuke()
Method used by test code, to reset state of the name table.
-
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:
maybeDirtyin classNameTable
-
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:
toStringin classjava.lang.Object
-
toDebugString
public java.lang.String toDebugString()
-
-