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

  - ### Inherited Methods Summary

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

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