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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns anIteratorof all namespace prefixes declared within this context, irrespective of any ancestor contexts.static final NamespaceContextgetNamespaceURI(String prefix) Returns a reference to the parent of this context.Returns anIteratorof all namespace prefixes in scope within this context, including those inherited from ancestor contexts.getPrefixes(String nsURI) booleanisPrefixDeclared(String prefix) Determines if the specified prefix is declared within this context, irrespective of any ancestor contexts.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
EmptyNamespaceContext
public EmptyNamespaceContext()
-
-
Method Details
-
getInstance
-
getNamespaceURI
- Specified by:
getNamespaceURIin interfaceNamespaceContext
-
getPrefix
- Specified by:
getPrefixin interfaceNamespaceContext
-
getPrefixes
- Specified by:
getPrefixesin interfaceNamespaceContext
-
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
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
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
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.
-