Package com.fasterxml.aalto.in
Class NsDeclaration
java.lang.Object
com.fasterxml.aalto.in.NsDeclaration
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
FieldsModifier and TypeFieldDescriptionprivate final NsBinding
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
Nesting level of this declaration.private final NsDeclaration
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionNsDeclaration
(NsBinding binding, String newURI, NsDeclaration prevDecl, int level) -
Method Summary
Modifier and TypeMethodDescriptionboolean
alreadyDeclared
(String prefix, int level) int
countDeclsOnLevel
(int level) int
getLevel()
getPrev()
boolean
boolean
toString()
unbind()
Method called after END_ELEMENT is processed, to unbind declaration that now goes out of scope
-
Field Details
-
mBinding
Reference to the actual binding that will be updated by this declaration (URI changed when declaration comes in and goes out of scope) -
mPreviousURI
-
mPrevDeclaration
-
mLevel
private final int mLevelNesting 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.
-
-
Constructor Details
-
NsDeclaration
-
-
Method Details
-
getLevel
public int getLevel() -
getPrev
-
getBinding
-
getPrefix
-
getCurrNsURI
-
hasPrefix
-
hasNsURI
-
unbind
Method called after END_ELEMENT is processed, to unbind declaration that now goes out of scope -
alreadyDeclared
-
countDeclsOnLevel
public int countDeclsOnLevel(int level) -
toString
-