Class RootNode

All Implemented Interfaces:
Source, SourceLocator, net.sf.saxon.lib.ActiveSource, net.sf.saxon.om.GroundedValue, net.sf.saxon.om.Item, net.sf.saxon.om.NodeInfo, net.sf.saxon.om.Sequence, net.sf.saxon.s9api.Location, Locator

public class RootNode extends AbstractRootNode
Represents DetailAST's root node of Xpath-tree.
  • Field Details

  • Constructor Details

    • RootNode

      public RootNode(DetailAST detailAst)
      Creates a new RootNode instance.
      Parameters:
      detailAst - reference to DetailAST
  • Method Details

    • createChildren

      Iterates siblings of the current node and recursively creates new Xpath-nodes.
      Specified by:
      createChildren in class AbstractNode
      Returns:
      children list
    • hasChildNodes

      public boolean hasChildNodes()
      Determine whether the node has any children.
      Returns:
      true is the node has any children.
    • getLineNumber

      public int getLineNumber()
      Returns line number.
      Returns:
      line number
    • getColumnNumber

      public int getColumnNumber()
      Returns column number.
      Returns:
      column number
    • getTokenType

      public int getTokenType()
      Getter method for token type. Returns the actual type of the underlying AST root, which is either COMPILATION_UNIT for an ordinary compilation unit or COMPACT_COMPILATION_UNIT for a JEP 512 compact source file.
      Specified by:
      getTokenType in class AbstractNode
      Returns:
      token type of the underlying AST root
    • getUnderlyingNode

      Returns underlying node.
      Specified by:
      getUnderlyingNode in class AbstractNode
      Returns:
      underlying node