Class NsDeclaration


  • public final class NsDeclaration
    extends java.lang.Object
    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.
    • Constructor Detail

      • NsDeclaration

        public NsDeclaration​(com.fasterxml.aalto.in.NsBinding binding,
                             java.lang.String newURI,
                             NsDeclaration prevDecl,
                             int level)
    • Method Detail

      • getLevel

        public int getLevel()
      • getBinding

        public com.fasterxml.aalto.in.NsBinding getBinding()
      • getPrefix

        public java.lang.String getPrefix()
      • getCurrNsURI

        public java.lang.String getCurrNsURI()
      • hasPrefix

        public boolean hasPrefix​(java.lang.String prefix)
      • hasNsURI

        public boolean hasNsURI​(java.lang.String uri)
      • unbind

        public NsDeclaration unbind()
        Method called after END_ELEMENT is processed, to unbind declaration that now goes out of scope
      • alreadyDeclared

        public boolean alreadyDeclared​(java.lang.String prefix,
                                       int level)
      • countDeclsOnLevel

        public int countDeclsOnLevel​(int level)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object