Package org.codehaus.groovy.classgen
Class ReturnAdder
- java.lang.Object
-
- org.codehaus.groovy.classgen.ReturnAdder
-
public class ReturnAdder extends java.lang.Object
Utility class to add return statements. Extracted from Verifier as it can be useful for some AST transformations
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ReturnAdder.ReturnStatementListener
Implement this method in order to be notified whenever a return statement is generated.
-
Constructor Summary
Constructors Constructor Description ReturnAdder()
ReturnAdder(ReturnAdder.ReturnStatementListener listener)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
addReturnIfNeeded(MethodNode node)
Deprecated.UsevisitMethod(org.codehaus.groovy.ast.MethodNode)
insteadvoid
visitMethod(MethodNode node)
-
-
-
Constructor Detail
-
ReturnAdder
public ReturnAdder()
-
ReturnAdder
public ReturnAdder(ReturnAdder.ReturnStatementListener listener)
-
-
Method Detail
-
addReturnIfNeeded
@Deprecated public static void addReturnIfNeeded(MethodNode node)
Deprecated.UsevisitMethod(org.codehaus.groovy.ast.MethodNode)
insteadAdds 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)
-
-