public final class FixedNsContext
extends java.lang.Object
implements javax.xml.namespace.NamespaceContext
NamespaceContext.| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String[] |
_declarationData
Array that contains prefix/namespace-uri pairs, ordered from the
most recent declaration to older ones.
|
protected NsDeclaration |
_lastDeclaration
We will keep a reference to the last namespace declaration
in effect at point when this instance was created.
|
protected java.util.ArrayList<java.lang.String> |
_tmpDecl
Temporary List used for constructing compact namespace binding
information that we will actually use.
|
static FixedNsContext |
EMPTY_CONTEXT
We can share and reuse "no bindings" instance.
|
| Modifier | Constructor and Description |
|---|---|
private |
FixedNsContext(NsDeclaration lastDecl,
java.lang.String[] declData) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getNamespaceURI(java.lang.String prefix) |
java.lang.String |
getPrefix(java.lang.String nsURI) |
java.util.Iterator<?> |
getPrefixes(java.lang.String nsURI) |
FixedNsContext |
reuseOrCreate(NsDeclaration currLastDecl)
Method called to either reuse this context or construct a new
one.
|
java.lang.String |
toString() |
public static final FixedNsContext EMPTY_CONTEXT
protected final NsDeclaration _lastDeclaration
protected final java.lang.String[] _declarationData
protected java.util.ArrayList<java.lang.String> _tmpDecl
private FixedNsContext(NsDeclaration lastDecl, java.lang.String[] declData)
public FixedNsContext reuseOrCreate(NsDeclaration currLastDecl)
public final java.lang.String getNamespaceURI(java.lang.String prefix)
getNamespaceURI in interface javax.xml.namespace.NamespaceContextpublic final java.lang.String getPrefix(java.lang.String nsURI)
getPrefix in interface javax.xml.namespace.NamespaceContextpublic final java.util.Iterator<?> getPrefixes(java.lang.String nsURI)
getPrefixes in interface javax.xml.namespace.NamespaceContextpublic java.lang.String toString()
toString in class java.lang.Object