Package: org.codehaus.groovy.transform.stc

## [Java] Class TypeCheckingContext.EnclosingClosure

- org.codehaus.groovy.transform.stc.TypeCheckingContext.EnclosingClosure

-     public static class TypeCheckingContext.EnclosingClosure
      extends Object

  Represents the context of an enclosing closure. An enclosing closure wraps a closure expression and the list of return types found in the closure body.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `EnclosingClosure(ClosureExpression closureExpression)` Creates metadata for an enclosing closure.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `addReturnType(ClassNode type)` Records another inferred closure return type.
    `` | `public ClosureExpression` | `getClosureExpression()` Returns the wrapped closure expression.
    `` | `public List<ClassNode>` | `getReturnTypes()` Returns the return types collected for the closure body.
    `` | `public String` | `toString()` Returns a diagnostic representation of this closure context.

  - ### Inherited Methods Summary

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

- - ### Constructor Detail

    - #### public EnclosingClosure(ClosureExpression closureExpression)

      Creates metadata for an enclosing closure.

  - ### Method Detail

    - #### public void addReturnType(ClassNode type)

      Records another inferred closure return type.

    - #### public ClosureExpression getClosureExpression()

      Returns the wrapped closure expression.

    - #### public List<ClassNode> getReturnTypes()

      Returns the return types collected for the closure body.

    - #### public String toString()

      Returns a diagnostic representation of this closure context.