|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
Nested Class Summary | |
---|---|
static interface |
ReturnAdder.ReturnStatementListener
Implement this method in order to be notified whenever a return statement is generated. |
Constructor Summary | |
ReturnAdder()
|
|
ReturnAdder(ReturnAdder.ReturnStatementListener listener)
|
Method Summary | |
---|---|
static void
|
addReturnIfNeeded(MethodNode node)
Adds return statements in method code whenever an implicit return is detected. |
void
|
visitMethod(MethodNode node)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Constructor Detail |
---|
public ReturnAdder()
public ReturnAdder(ReturnAdder.ReturnStatementListener listener)
Method Detail |
---|
public static void addReturnIfNeeded(MethodNode node)
node
- the method node where to add return statements
public void visitMethod(MethodNode node)
Copyright © 2003-2013 The Codehaus. All rights reserved.