Package org.codehaus.groovy.classgen
Class ReturnAdder
java.lang.Object
org.codehaus.groovy.classgen.ReturnAdder
Utility class to add return statements.
Extracted from Verifier as it can be useful for some AST transformations
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Implement this method in order to be notified whenever a return statement is generated. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addReturnIfNeeded
(MethodNode node) Deprecated.void
visitMethod
(MethodNode node)
-
Constructor Details
-
ReturnAdder
public ReturnAdder() -
ReturnAdder
-
-
Method Details
-
addReturnIfNeeded
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
-
visitMethod(org.codehaus.groovy.ast.MethodNode)
instead