Package: org.codehaus.groovy.transform.tailrec

## [Java] Class AstHelper

- org.codehaus.groovy.transform.tailrec.AstHelper

-     public class AstHelper
      extends Object

  Helping to create a few standard AST constructs

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static ExpressionStatement` | `createVariableAlias(String aliasName, ClassNode variableType, String variableName)` Creates an alias variable that references another variable.
    `` | `public static ExpressionStatement` | `createVariableDefinition(String variableName, ClassNode variableType, Expression value)` Creates a local variable declaration for the supplied value.
    `` | `public static ExpressionStatement` | `createVariableDefinition(String variableName, ClassNode variableType, Expression value, boolean variableShouldBeFinal)` Creates a local variable declaration for the supplied value.
    `` | `public static VariableExpression` | `createVariableReference(Map<String, ?> variableSpec)` Creates a variable reference from a name/type specification map.
    `` | `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
    `` | `public static Statement` | `recurStatement()` This statement should make the code jump to surrounding while loop's start label Does not work from within Closures

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

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

      Creates an alias variable that references another variable.

      Parameters:
        `aliasName` - the alias variable name
        `variableType` - the alias variable type
        `variableName` - the referenced variable name
      Returns:
        a declaration statement for the alias variable

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

      Creates a local variable declaration for the supplied value.

      Parameters:
        `variableName` - the declared variable name
        `variableType` - the declared variable type
        `value` - the initial value expression
      Returns:
        a declaration statement for the new local variable

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

      Creates a local variable declaration for the supplied value.

      Parameters:
        `variableName` - the declared variable name
        `variableType` - the declared variable type
        `value` - the initial value expression
        `variableShouldBeFinal` - whether the declared variable should be `final`
      Returns:
        a declaration statement for the new local variable

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

      Creates a variable reference from a name/type specification map.

      Parameters:
        `variableSpec` - a map containing `name` and `type` entries
      Returns:
        a variable expression for the supplied specification

    - #### 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

    - #### public static Statement recurStatement()

      This statement should make the code jump to surrounding while loop's start label Does not work from within Closures