XmlTreePath (API documentation of hlt.language packages)
Date: 2013-01-30

hlt.language.syntax

## Class XmlTreePath

- java.lang.Object
- - hlt.language.syntax.XmlTreePath

-     public class XmlTreePath
      extends java.lang.Object

  This class packages the information parsed from an XML serialization annotation to denote a path in the XML tree corresponding to a given CST child. It is of the form `c[x1...xn]/a`, where `c` is a positive integer denoting a CST child position, the `xi`'s are positive integers denoting a path in the XML tree for the CST corresponding to this child position, and `a` is a symbol; both `[x1...xn]` and `/a` are optional.
  Version:
    Last modified on Fri Apr 13 20:20:47 2012 by hak
  Author:
    Hassan Aït-Kaci
  Copyright:
    © by the author

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XmlTreePath()`
    `XmlTreePath(int child, int[] path, java.lang.String attribute)` Constructs an `XmlTreePath` with child position, an `int[]` xml tree address, and attribute reference name.
    `XmlTreePath(int child, IntArrayList path, java.lang.String attribute)` Constructs an `XmlTreePath` with child position, an `IntArreyList` xml tree address, and attribute reference name.
    `XmlTreePath(int child, java.lang.String attribute)` Constructs an `XmlTreePath` with child position and attribute reference name.
    `XmlTreePath(java.lang.String attribute)` Constructs an `XmlTreePath` with unspecified child position nor tree address, and specified attribute reference name.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `attribute()` Returns attribute.
    `int` | `child()` Returns the child index.
    `boolean` | `hasAttribute()` Returns `true` whenever this actually refers to an attribute.
    `boolean` | `hasChild()` Returns `true` whenever this has a known child index.
    `int[]` | `path()` Returns the path.
    `XmlTreePath` | `setChild(int child)` Sets the child index to the specified integer and returns this `XmlTreePath`.
    `XmlTreePath` | `setPath(int[] path)` Sets the XML path to the specified `int[]` and returns this `XmlTreePath`.
    `XmlTreePath` | `setPath(IntArrayList path)` Sets the XML path to the specified `int[]` and returns this `XmlTreePath`.
    `java.lang.String` | `toString()` Returns a `String` form of this `XmlTreePath` of the form `c[x1 ...`

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

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

- - ### Constructor Detail

    - #### XmlTreePath

          public XmlTreePath()

    - #### XmlTreePath

          public XmlTreePath(int child,
                     java.lang.String attribute)

      Constructs an `XmlTreePath` with child position and attribute reference name.

    - #### XmlTreePath

          public XmlTreePath(int child,
                     int[] path,
                     java.lang.String attribute)

      Constructs an `XmlTreePath` with child position, an `int[]` xml tree address, and attribute reference name.

    - #### XmlTreePath

          public XmlTreePath(int child,
                     IntArrayList path,
                     java.lang.String attribute)

      Constructs an `XmlTreePath` with child position, an `IntArreyList` xml tree address, and attribute reference name.

    - #### XmlTreePath

          public XmlTreePath(java.lang.String attribute)

      Constructs an `XmlTreePath` with unspecified child position nor tree address, and specified attribute reference name.

  - ### Method Detail

    - #### setChild

          public XmlTreePath setChild(int child)

      Sets the child index to the specified integer and returns this `XmlTreePath`.

    - #### child

          public int child()

      Returns the child index.

    - #### hasChild

          public boolean hasChild()

      Returns `true` whenever this has a known child index.

    - #### setPath

          public XmlTreePath setPath(int[] path)

      Sets the XML path to the specified `int[]` and returns this `XmlTreePath`.

    - #### setPath

          public XmlTreePath setPath(IntArrayList path)

      Sets the XML path to the specified `int[]` and returns this `XmlTreePath`.

    - #### path

          public int[] path()

      Returns the path.

    - #### attribute

          public java.lang.String attribute()

      Returns attribute.

    - #### hasAttribute

          public boolean hasAttribute()

      Returns `true` whenever this actually refers to an attribute.

    - #### toString

          public final java.lang.String toString()

      Returns a `String` form of this `XmlTreePath` of the form `c[x1 ... xn]/a`.
      Overrides:
        `toString` in class `java.lang.Object`