ReturnAdder (groovy 2.4.10 API)
Date: 2017-03-14

Package: org.codehaus.groovy.classgen

## [Java] Class ReturnAdder

- 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

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `interface` | `ReturnAdder.ReturnStatementListener` | Implement this method in order to be notified whenever a return statement is generated.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `ReturnAdder ()`
    `ReturnAdder (ReturnAdder.ReturnStatementListener listener)`

  - ### Methods Summary

    Methods
    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)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Constructor Detail

    - #### public ReturnAdder()

    - #### public ReturnAdder(ReturnAdder.ReturnStatementListener listener)

  - ### Method Detail

    - #### @Deprecated public static void addReturnIfNeeded(MethodNode node)

      Adds return statements in method code whenever an implicit return is detected.

      deprecated:
        Use visitMethod(org.codehaus.groovy.ast.MethodNode) instead
      Parameters:
        `node` - the method node where to add return statements

    - #### public void visitMethod(MethodNode node)