Package: org.codehaus.groovy.classgen

## [Java] Class ReturnAdder

- org.codehaus.groovy.classgen.ReturnAdder

-     public class ReturnAdder
      extends Object

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

  - ### 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)` deprecated: Use visitMethod(MethodNode) instead.
    `` | `void` | `visitMethod(MethodNode node)` Adds return statements to given method whenever an implicit return is detected.

  - ### 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)

      deprecated:
        Use visitMethod(MethodNode) instead.

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

      Adds return statements to given method whenever an implicit return is detected.