On this page
[Java] Class AstHelper
- org.codehaus.groovy.transform.tailrec.AstHelper
public class AstHelper
extends Object
Helping to create a few standard AST constructs
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
public static ExpressionStatement |
createVariableAlias(String aliasName, ClassNode variableType, String variableName) |
|
public static ExpressionStatement |
createVariableDefinition(String variableName, ClassNode variableType, Expression value) |
|
public static ExpressionStatement |
createVariableDefinition(String variableName, ClassNode variableType, Expression value, boolean variableShouldBeFinal) |
|
public static VariableExpression |
createVariableReference(Map<String, ?> variableSpec) |
|
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
Method Detail
public static ExpressionStatement createVariableAlias(String aliasName, ClassNode variableType, String variableName)
public static ExpressionStatement createVariableDefinition(String variableName, ClassNode variableType, Expression value)
public static ExpressionStatement createVariableDefinition(String variableName, ClassNode variableType, Expression value, boolean variableShouldBeFinal)
public static VariableExpression createVariableReference(Map<String, ?> variableSpec)
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
© 2003-2022 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/4.0.0/html/gapi/org/codehaus/groovy/transform/tailrec/AstHelper.html