public final class FixedNsContext extends Object implements NamespaceContext
NamespaceContext
.Modifier and Type | Field and Description |
---|---|
protected 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 ArrayList<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 and Type | Method and Description |
---|---|
String |
getNamespaceURI(String prefix) |
String |
getPrefix(String nsURI) |
Iterator<String> |
getPrefixes(String nsURI) |
FixedNsContext |
reuseOrCreate(NsDeclaration currLastDecl)
Method called to either reuse this context or construct a new
one.
|
String |
toString() |
public static final FixedNsContext EMPTY_CONTEXT
protected final NsDeclaration _lastDeclaration
protected final String[] _declarationData
public FixedNsContext reuseOrCreate(NsDeclaration currLastDecl)
public final String getNamespaceURI(String prefix)
getNamespaceURI
in interface NamespaceContext
public final String getPrefix(String nsURI)
getPrefix
in interface NamespaceContext
public final Iterator<String> getPrefixes(String nsURI)
getPrefixes
in interface NamespaceContext
Copyright © 2019 FasterXML. All rights reserved.