javanet.staxutils
public final class EmptyNamespaceContext extends Object implements ExtendedNamespaceContext, StaticNamespaceContext
ExtendedNamespaceContext
that contains no namespaces.Modifier and Type | Field and Description |
---|---|
static EmptyNamespaceContext |
INSTANCE |
Constructor and Description |
---|
EmptyNamespaceContext() |
Modifier and Type | Method and Description |
---|---|
Iterator |
getDeclaredPrefixes()
Returns an
Iterator of all namespace prefixes declared within
this context, irrespective of any ancestor contexts. |
static NamespaceContext |
getInstance() |
String |
getNamespaceURI(String prefix) |
NamespaceContext |
getParent()
Returns a reference to the parent of this context.
|
String |
getPrefix(String nsURI) |
Iterator |
getPrefixes()
Returns an
Iterator of all namespace prefixes in scope within this
context, including those inherited from ancestor contexts. |
Iterator |
getPrefixes(String nsURI) |
boolean |
isPrefixDeclared(String prefix)
Determines if the specified prefix is declared within this context,
irrespective of any ancestor contexts.
|
public static final EmptyNamespaceContext INSTANCE
public static final NamespaceContext getInstance()
public String getNamespaceURI(String prefix)
getNamespaceURI
in interface NamespaceContext
public String getPrefix(String nsURI)
getPrefix
in interface NamespaceContext
public Iterator getPrefixes(String nsURI)
getPrefixes
in interface NamespaceContext
public NamespaceContext getParent()
ExtendedNamespaceContext
getParent
in interface ExtendedNamespaceContext
null
if this is a root
context.public boolean isPrefixDeclared(String prefix)
ExtendedNamespaceContext
isPrefixDeclared
in interface ExtendedNamespaceContext
prefix
- The prefix to check.true
if the prefix is declared in this context,
false
otherwise.public Iterator getPrefixes()
ExtendedNamespaceContext
Iterator
of all namespace prefixes in scope within this
context, including those inherited from ancestor contexts.getPrefixes
in interface ExtendedNamespaceContext
Iterator
of prefix String
s.public Iterator getDeclaredPrefixes()
ExtendedNamespaceContext
Iterator
of all namespace prefixes declared within
this context, irrespective of any ancestor contexts.getDeclaredPrefixes
in interface ExtendedNamespaceContext
Iterator
of prefix String
s.