net.sf.saxon.om
Class DiagnosticNamePool

java.lang.Object
  extended by net.sf.saxon.om.NamePool
      extended by net.sf.saxon.om.DiagnosticNamePool
All Implemented Interfaces:
Serializable

public class DiagnosticNamePool
extends NamePool

This class provides a diagnostic wrapper for the real NamePool. There are no formal interfaces to exploit it, but it can be patched into a system by use of setNamePool() on the Configuration, and its effect is to trace entry to selected methods, notably those that are synchronized, for diagnostic analysis.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.saxon.om.NamePool
NamePool.NamePoolLimitException
 
Field Summary
 
Fields inherited from class net.sf.saxon.om.NamePool
FP_MASK, MAX_PREFIXES_PER_URI, USER_DEFINED_MASK
 
Constructor Summary
DiagnosticNamePool()
           
 
Method Summary
 int allocate(String prefix, String uri, String localName)
          Allocate a name from the pool, or a new Name if there is not a matching one there
 short allocateCodeForURI(String uri)
          Allocate the uri code for a given URI; create one if not found
 int allocateNamespaceCode(String prefix, String uri)
          Allocate the namespace code for a namespace prefix/URI pair.
 
Methods inherited from class net.sf.saxon.om.NamePool
allocateClarkName, allocateLexicalQName, diagnosticDump, getClarkName, getClientData, getCodeForPrefix, getCodeForURI, getDisplayName, getFingerprint, getLocalName, getNamespaceCode, getNamespaceCode, getPrefix, getPrefixFromNamespaceCode, getPrefixIndex, getURI, getURICode, getURIFromNamespaceCode, getURIFromURICode, isPrefixed, parseClarkName, setClientData, statistics, suggestPrefixForURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiagnosticNamePool

public DiagnosticNamePool()
Method Detail

allocateNamespaceCode

public int allocateNamespaceCode(String prefix,
                                 String uri)
Description copied from class: NamePool
Allocate the namespace code for a namespace prefix/URI pair. Create it if not already present

Overrides:
allocateNamespaceCode in class NamePool
Parameters:
prefix - the namespace prefix
uri - the namespace URI
Returns:
an integer code identifying the namespace. The namespace code identifies both the prefix and the URI.

allocateCodeForURI

public short allocateCodeForURI(String uri)
Description copied from class: NamePool
Allocate the uri code for a given URI; create one if not found

Overrides:
allocateCodeForURI in class NamePool
Parameters:
uri - The namespace URI. Supply "" or null for the "null namespace"
Returns:
an integer code that uniquely identifies this URI within the namepool.

allocate

public int allocate(String prefix,
                    String uri,
                    String localName)
Description copied from class: NamePool
Allocate a name from the pool, or a new Name if there is not a matching one there

Overrides:
allocate in class NamePool
Parameters:
prefix - the namespace prefix. Use "" for the null prefix, representing the absent namespace
uri - the namespace URI. Use "" or null for the non-namespace.
localName - the local part of the name
Returns:
an integer (the "namecode") identifying the name within the namepool. The Name itself may be retrieved using the getName(int) method


Copyright (c) Saxonica Limited. All rights reserved.