org.codehaus.groovy.classgen
Class ReturnAdder
java.lang.Object
org.codehaus.groovy.classgen.ReturnAdder
public class ReturnAdder
- extends Object
Utility class to add return statements.
Extracted from Verifier as it can be useful for some AST transformations
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReturnAdder
public ReturnAdder()
ReturnAdder
public ReturnAdder(ReturnAdder.ReturnStatementListener listener)
addReturnIfNeeded
public static void addReturnIfNeeded(MethodNode node)
- Deprecated. Use
visitMethod(org.codehaus.groovy.ast.MethodNode)
instead
- Adds return statements in method code whenever an implicit return is detected.
- Parameters:
node
- the method node where to add return statements
visitMethod
public void visitMethod(MethodNode node)