Package javanet.staxutils
Class EmptyNamespaceContext
- java.lang.Object
-
- javanet.staxutils.EmptyNamespaceContext
-
- All Implemented Interfaces:
ExtendedNamespaceContext
,StaticNamespaceContext
,NamespaceContext
public final class EmptyNamespaceContext extends Object implements ExtendedNamespaceContext, StaticNamespaceContext
ExtendedNamespaceContext
that contains no namespaces.- Version:
- $Revision: 1.2 $
- Author:
- Christian Niles
-
-
Field Summary
Fields Modifier and Type Field Description static EmptyNamespaceContext
INSTANCE
-
Constructor Summary
Constructors Constructor Description EmptyNamespaceContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator
getDeclaredPrefixes()
Returns anIterator
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 anIterator
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.
-
-
-
Field Detail
-
INSTANCE
public static final EmptyNamespaceContext INSTANCE
-
-
Method Detail
-
getInstance
public static final NamespaceContext getInstance()
-
getNamespaceURI
public String getNamespaceURI(String prefix)
- Specified by:
getNamespaceURI
in interfaceNamespaceContext
-
getPrefix
public String getPrefix(String nsURI)
- Specified by:
getPrefix
in interfaceNamespaceContext
-
getPrefixes
public Iterator getPrefixes(String nsURI)
- Specified by:
getPrefixes
in interfaceNamespaceContext
-
getParent
public NamespaceContext getParent()
Description copied from interface:ExtendedNamespaceContext
Returns a reference to the parent of this context.- Specified by:
getParent
in interfaceExtendedNamespaceContext
- Returns:
- The parent context, or
null
if this is a root context.
-
isPrefixDeclared
public boolean isPrefixDeclared(String prefix)
Description copied from interface:ExtendedNamespaceContext
Determines if the specified prefix is declared within this context, irrespective of any ancestor contexts.- Specified by:
isPrefixDeclared
in interfaceExtendedNamespaceContext
- Parameters:
prefix
- The prefix to check.- Returns:
true
if the prefix is declared in this context,false
otherwise.
-
getPrefixes
public Iterator getPrefixes()
Description copied from interface:ExtendedNamespaceContext
Returns anIterator
of all namespace prefixes in scope within this context, including those inherited from ancestor contexts.- Specified by:
getPrefixes
in interfaceExtendedNamespaceContext
- Returns:
- An
Iterator
of prefixString
s.
-
getDeclaredPrefixes
public Iterator getDeclaredPrefixes()
Description copied from interface:ExtendedNamespaceContext
Returns anIterator
of all namespace prefixes declared within this context, irrespective of any ancestor contexts.- Specified by:
getDeclaredPrefixes
in interfaceExtendedNamespaceContext
- Returns:
- An
Iterator
of prefixString
s.
-
-