public class ScriptLastStatementTransformer extends Object implements org.codehaus.groovy.transform.ASTTransformation
A transformer that tags a CRaSH script class when it has an explicit return statement. Indeed Groovy script last statement are returned by default and this value is sometimes not desirable in CRaSH script commands unless they are explicitly returned by the script.
Modifier and Type | Field and Description |
---|---|
static String |
FIELD_NAME
.
|
private static org.codehaus.groovy.ast.ClassNode |
GROOVY_SCRIPT_COMMAND
.
|
Constructor and Description |
---|
ScriptLastStatementTransformer() |
public static final String FIELD_NAME
private static final org.codehaus.groovy.ast.ClassNode GROOVY_SCRIPT_COMMAND
public ScriptLastStatementTransformer()
public void visit(org.codehaus.groovy.ast.ASTNode[] nodes, org.codehaus.groovy.control.SourceUnit source)
visit
in interface org.codehaus.groovy.transform.ASTTransformation
Copyright © 2015 eXo Platform SAS. All Rights Reserved.