com.fasterxml.aalto.in

## Class NsDeclaration

- java.lang.Object
- - com.fasterxml.aalto.in.NsDeclaration

-     public final class NsDeclaration
      extends 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 Summary

    Constructors
    Constructor and Description
    `NsDeclaration(com.fasterxml.aalto.in.NsBinding binding, String newURI, NsDeclaration prevDecl, int level)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `alreadyDeclared(String prefix, int level)`
    `int` | `countDeclsOnLevel(int level)`
    `com.fasterxml.aalto.in.NsBinding` | `getBinding()`
    `String` | `getCurrNsURI()`
    `int` | `getLevel()`
    `String` | `getPrefix()`
    `NsDeclaration` | `getPrev()`
    `boolean` | `hasNsURI(String uri)`
    `boolean` | `hasPrefix(String prefix)`
    `String` | `toString()`
    `NsDeclaration` | `unbind()` Method called after END_ELEMENT is processed, to unbind declaration that now goes out of scope

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### NsDeclaration

          public NsDeclaration(com.fasterxml.aalto.in.NsBinding binding,
                       String newURI,
                       NsDeclaration prevDecl,
                       int level)

  - ### Method Detail

    - #### getLevel

          public int getLevel()

    - #### getPrev

          public NsDeclaration getPrev()

    - #### getBinding

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

    - #### getPrefix

          public String getPrefix()

    - #### getCurrNsURI

          public String getCurrNsURI()

    - #### hasPrefix

          public boolean hasPrefix(String prefix)

    - #### hasNsURI

          public boolean hasNsURI(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(String prefix,
                                int level)

    - #### countDeclsOnLevel

          public int countDeclsOnLevel(int level)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2012-2015 FasterXML. All Rights Reserved.