Class AstHelper
java.lang.Object
org.codehaus.groovy.transform.tailrec.AstHelper
Helping to create a few standard AST constructs
- 
Method SummaryModifier and TypeMethodDescriptionstatic ExpressionStatementcreateVariableAlias(String aliasName, ClassNode variableType, String variableName) static ExpressionStatementcreateVariableDefinition(String variableName, ClassNode variableType, Expression value) static ExpressionStatementcreateVariableDefinition(String variableName, ClassNode variableType, Expression value, boolean variableShouldBeFinal) static VariableExpressioncreateVariableReference(Map<String, ?> variableSpec) static StatementThis 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 slowerstatic StatementThis statement should make the code jump to surrounding while loop's start label Does not work from within Closures
- 
Method Details- 
createVariableDefinitionpublic static ExpressionStatement createVariableDefinition(String variableName, ClassNode variableType, Expression value) 
- 
createVariableDefinitionpublic static ExpressionStatement createVariableDefinition(String variableName, ClassNode variableType, Expression value, boolean variableShouldBeFinal) 
- 
createVariableAliaspublic static ExpressionStatement createVariableAlias(String aliasName, ClassNode variableType, String variableName) 
- 
createVariableReference
- 
recurStatementThis statement should make the code jump to surrounding while loop's start label Does not work from within Closures
- 
recurByThrowStatementThis 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
 
-