AstHelper (Groovy 5.0.7)
Description: declaration: package: org.codehaus.groovy.transform.tailrec, class: AstHelper

Package org.codehaus.groovy.transform.tailrec

# Class AstHelper

java.lang.Object
org.codehaus.groovy.transform.tailrec.AstHelper

public class AstHelper extends Object
Helping to create a few standard AST constructs

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ExpressionStatement`
  `createVariableAlias(String aliasName, ClassNode variableType, String variableName)`
  `static ExpressionStatement`
  `createVariableDefinition(String variableName, ClassNode variableType, Expression value)`
  `static ExpressionStatement`
  `createVariableDefinition(String variableName, ClassNode variableType, Expression value, boolean variableShouldBeFinal)`
  `static VariableExpression`
  `createVariableReference(Map<String,?> variableSpec)`
  `static Statement`
  `recurByThrowStatement()`
  This statement will throw exception which will be caught and redirected to jump to surrounding while loop's start label Also works from within Closures but is a tiny bit slower
  `static Statement`
  `recurStatement()`
  This statement should make the code jump to surrounding while loop's start label Does not work from within Closures

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

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

- ## Method Details

  - ### createVariableDefinition

    public static ExpressionStatement createVariableDefinition(String variableName, ClassNode variableType, Expression value)

  - ### createVariableDefinition

    public static ExpressionStatement createVariableDefinition(String variableName, ClassNode variableType, Expression value, boolean variableShouldBeFinal)

  - ### createVariableAlias

    public static ExpressionStatement createVariableAlias(String aliasName, ClassNode variableType, String variableName)

  - ### createVariableReference

    public static VariableExpression createVariableReference(Map<String,?> variableSpec)

  - ### recurStatement

    public static Statement recurStatement()
    This statement should make the code jump to surrounding while loop's start label Does not work from within Closures

  - ### recurByThrowStatement

    public static Statement recurByThrowStatement()
    This statement will throw exception which will be caught and redirected to jump to surrounding while loop's start label Also works from within Closures but is a tiny bit slower