Top Description Fields Constructors Methods
com.fasterxml.aalto.in

public final Class NsDeclaration

extends Object
Class Inheritance

This class encapsulates information about a namespace binding declaration, associated with start elements. Declarations are stored as a linked list, to minimize fixed allocations, and since they only need to be accessed directly when dealing with START_ELEMENT and END_ELEMENT, not when binding element or attribute names.

Field Summary

Modifier and TypeField and Description
private final NsBinding
mBinding

Reference to the actual binding that will be updated by this declaration (URI changed when declaration comes in and goes out of scope)

private final int
mLevel

Nesting level of this declaration.

private final NsDeclaration
private final String

Constructor Summary

AccessConstructor and Description
public
NsDeclaration(NsBinding binding, String newURI, NsDeclaration prevDecl, int level)

Method Summary

Modifier and TypeMethod and Description
public boolean
alreadyDeclared(String prefix, int level)

public int
countDeclsOnLevel(int level)

public NsBinding
public String
public int
public String
public NsDeclaration
public boolean
public boolean
hasPrefix(String prefix)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public NsDeclaration
unbind()

Method called after END_ELEMENT is processed, to unbind declaration that now goes out of scope

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

mBindingback to summary
private final NsBinding mBinding

Reference to the actual binding that will be updated by this declaration (URI changed when declaration comes in and goes out of scope)

mLevelback to summary
private final int mLevel

Nesting level of this declaration. Used when unbinding declarations, to see if the particular declaration is associated with the start element for which end element is pair.

mPrevDeclarationback to summary
private final NsDeclaration mPrevDeclaration
mPreviousURIback to summary
private final String mPreviousURI

Constructor Detail

NsDeclarationback to summary
public NsDeclaration(NsBinding binding, String newURI, NsDeclaration prevDecl, int level)

Method Detail

alreadyDeclaredback to summary
public boolean alreadyDeclared(String prefix, int level)
countDeclsOnLevelback to summary
public int countDeclsOnLevel(int level)
getBindingback to summary
public NsBinding getBinding()
getCurrNsURIback to summary
public String getCurrNsURI()
getLevelback to summary
public int getLevel()
getPrefixback to summary
public String getPrefix()
getPrevback to summary
public NsDeclaration getPrev()
hasNsURIback to summary
public boolean hasNsURI(String uri)
hasPrefixback to summary
public boolean hasPrefix(String prefix)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
unbindback to summary
public NsDeclaration unbind()

Method called after END_ELEMENT is processed, to unbind declaration that now goes out of scope