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
ExtendedNamespaceContextthat contains no namespaces.- Version:
- $Revision: 1.2 $
- Author:
- Christian Niles
-
-
Field Summary
Fields Modifier and Type Field Description static EmptyNamespaceContextINSTANCE
-
Constructor Summary
Constructors Constructor Description EmptyNamespaceContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IteratorgetDeclaredPrefixes()Returns anIteratorof all namespace prefixes declared within this context, irrespective of any ancestor contexts.static NamespaceContextgetInstance()StringgetNamespaceURI(String prefix)NamespaceContextgetParent()Returns a reference to the parent of this context.StringgetPrefix(String nsURI)IteratorgetPrefixes()Returns anIteratorof all namespace prefixes in scope within this context, including those inherited from ancestor contexts.IteratorgetPrefixes(String nsURI)booleanisPrefixDeclared(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:
getNamespaceURIin interfaceNamespaceContext
-
getPrefix
public String getPrefix(String nsURI)
- Specified by:
getPrefixin interfaceNamespaceContext
-
getPrefixes
public Iterator getPrefixes(String nsURI)
- Specified by:
getPrefixesin interfaceNamespaceContext
-
getParent
public NamespaceContext getParent()
Description copied from interface:ExtendedNamespaceContextReturns a reference to the parent of this context.- Specified by:
getParentin interfaceExtendedNamespaceContext- Returns:
- The parent context, or
nullif this is a root context.
-
isPrefixDeclared
public boolean isPrefixDeclared(String prefix)
Description copied from interface:ExtendedNamespaceContextDetermines if the specified prefix is declared within this context, irrespective of any ancestor contexts.- Specified by:
isPrefixDeclaredin interfaceExtendedNamespaceContext- Parameters:
prefix- The prefix to check.- Returns:
trueif the prefix is declared in this context,falseotherwise.
-
getPrefixes
public Iterator getPrefixes()
Description copied from interface:ExtendedNamespaceContextReturns anIteratorof all namespace prefixes in scope within this context, including those inherited from ancestor contexts.- Specified by:
getPrefixesin interfaceExtendedNamespaceContext- Returns:
- An
Iteratorof prefixStrings.
-
getDeclaredPrefixes
public Iterator getDeclaredPrefixes()
Description copied from interface:ExtendedNamespaceContextReturns anIteratorof all namespace prefixes declared within this context, irrespective of any ancestor contexts.- Specified by:
getDeclaredPrefixesin interfaceExtendedNamespaceContext- Returns:
- An
Iteratorof prefixStrings.
-
-