org.crsh.lang.impl.groovy.ast
Class ScriptLastStatementTransformer
java.lang.Object
org.crsh.lang.impl.groovy.ast.ScriptLastStatementTransformer
- All Implemented Interfaces:
- org.codehaus.groovy.transform.ASTTransformation
-
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.
- Author:
- Julien Viet
Method Summary |
void |
visit(org.codehaus.groovy.ast.ASTNode[] nodes, org.codehaus.groovy.control.SourceUnit source)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FIELD_NAME
public static final String FIELD_NAME
-
.
- See Also:
- Constant Field Values
GROOVY_SCRIPT_COMMAND
private static final org.codehaus.groovy.ast.ClassNode GROOVY_SCRIPT_COMMAND
-
.
ScriptLastStatementTransformer
public ScriptLastStatementTransformer()
visit
public void visit(org.codehaus.groovy.ast.ASTNode[] nodes,
org.codehaus.groovy.control.SourceUnit source)
-
- Specified by:
visit
in interface org.codehaus.groovy.transform.ASTTransformation
-
Copyright © 2015 eXo Platform SAS. All Rights Reserved.