Extracted from Verifier as it can be useful for some AST transformations.
| Modifier and Type | Class and Description |
|---|---|
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private static final ReturnAdder. | |
| private final boolean | doAdd
If set to 'true', then returns are effectively added. |
| private final ReturnAdder. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| private Statement | |
| private Statement | |
| private static boolean | |
| public void | visitMethod(final MethodNode node)
Adds return statements to given method whenever an implicit return is detected. |
| DEFAULT_LISTENER | back to summary |
|---|---|
| private static final ReturnAdder. | |
| doAdd | back to summary |
|---|---|
| private final boolean doAdd If set to 'true', then returns are effectively added. This is useful whenever you just want to check what returns are produced without eventually adding them. | |
| listener | back to summary |
|---|---|
| private final ReturnAdder. | |
| ReturnAdder | back to summary |
|---|---|
| public ReturnAdder() | |
| ReturnAdder | back to summary |
|---|---|
| public ReturnAdder(final ReturnAdder. | |
| addReturnIfNeeded | back to summary |
|---|---|
| public static void addReturnIfNeeded(final MethodNode node)
Deprecated Use
| |
| addReturnsIfNeeded | back to summary |
|---|---|
| private Statement addReturnsIfNeeded(final Statement statement, final VariableScope scope) | |
| adjustSwitchCaseCode | back to summary |
|---|---|
| private Statement adjustSwitchCaseCode(final Statement statement, final VariableScope scope, final boolean lastCase) | |
| returns | back to summary |
|---|---|
| private static boolean returns(final Statement statement) | |
| visitMethod | back to summary |
|---|---|
| public void visitMethod(final MethodNode node) Adds return statements to given method whenever an implicit return is detected. | |
| Modifier and Type | Method and Description |
|---|---|
| public void | returnStatementAdded(ReturnStatement returnStatement)
Implement this method in order to be notified whenever a return statement is generated. |
| returnStatementAdded | back to summary |
|---|---|
| public void returnStatementAdded(ReturnStatement returnStatement) Implement this method in order to be notified whenever a return statement is generated. | |