PositionConfigureUtils (Groovy 3.0.9)

Package org.apache.groovy.parser.antlr4.util

## Class PositionConfigureUtils

- java.lang.Object
- - org.apache.groovy.parser.antlr4.util.PositionConfigureUtils

-     public class PositionConfigureUtils
      extends Object

  Utilities for configuring node positions

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PositionConfigureUtils()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static <T extends ASTNode> T` | `configureAST​(T astNode, org.antlr.v4.runtime.Token token)` |
    `static <T extends ASTNode> T` | `configureAST​(T astNode, org.antlr.v4.runtime.tree.TerminalNode terminalNode)` |
    `static <T extends ASTNode> T` | `configureAST​(T astNode, GroovyParser.GroovyParserRuleContext ctx)` | Sets location(lineNumber, colNumber, lastLineNumber, lastColumnNumber) for node using standard context information.
    `static <T extends ASTNode> T` | `configureAST​(T astNode, GroovyParser.GroovyParserRuleContext ctx, ASTNode stop)` |
    `static <T extends ASTNode> T` | `configureAST​(T astNode, ASTNode source)` |
    `static <T extends ASTNode> T` | `configureAST​(T astNode, ASTNode start, ASTNode stop)` |
    `static <T extends ASTNode> void` | `configureEndPosition​(T astNode, org.antlr.v4.runtime.Token token)` |
    `static Tuple2<Integer,​Integer>` | `endPosition​(org.antlr.v4.runtime.Token token)` |

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

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

- - ### Constructor Detail

    - #### PositionConfigureUtils

          public PositionConfigureUtils()

  - ### Method Detail

    - #### configureAST

          public static <T extends ASTNode> T configureAST​(T astNode,
                                                           GroovyParser.GroovyParserRuleContext ctx)

      Sets location(lineNumber, colNumber, lastLineNumber, lastColumnNumber) for node using standard context information. Note: this method is implemented to be closed over ASTNode. It returns same node as it received in arguments.
      Parameters:
        `astNode` - Node to be modified.
        `ctx` - Context from which information is obtained.
      Returns:
        Modified astNode.

    - #### endPosition

          public static Tuple2<Integer,​Integer> endPosition​(org.antlr.v4.runtime.Token token)

    - #### configureAST

          public static <T extends ASTNode> T configureAST​(T astNode,
                                                           org.antlr.v4.runtime.tree.TerminalNode terminalNode)

    - #### configureAST

          public static <T extends ASTNode> T configureAST​(T astNode,
                                                           org.antlr.v4.runtime.Token token)

    - #### configureAST

          public static <T extends ASTNode> T configureAST​(T astNode,
                                                           ASTNode source)

    - #### configureAST

          public static <T extends ASTNode> T configureAST​(T astNode,
                                                           GroovyParser.GroovyParserRuleContext ctx,
                                                           ASTNode stop)

    - #### configureEndPosition

          public static <T extends ASTNode> void configureEndPosition​(T astNode,
                                                                      org.antlr.v4.runtime.Token token)

    - #### configureAST

          public static <T extends ASTNode> T configureAST​(T astNode,
                                                           ASTNode start,
                                                           ASTNode stop)