Utility class to add return statements. Extracted from Verifier as it can be useful for some AST transformations
Modifiers | Name | Description |
---|---|---|
interface |
ReturnAdder.ReturnStatementListener |
Implement this method in order to be notified whenever a return statement is generated. |
Constructor and description |
---|
ReturnAdder
() |
ReturnAdder
(ReturnAdder.ReturnStatementListener listener) |
Type Params | Return Type | Name and description |
---|---|---|
|
static void |
addReturnIfNeeded(MethodNode node) Adds return statements in method code whenever an implicit return is detected. |
|
void |
visitMethod(MethodNode node) |
Adds return statements in method code whenever an implicit return is detected.
node
- the method node where to add return statementsCopyright © 2003-2018 The Apache Software Foundation. All rights reserved.