Package: org.codehaus.groovy.classgen.asm

## [Java] Class ClosureWriter

- org.codehaus.groovy.classgen.asm.ClosureWriter

-     public class ClosureWriter
      extends Object

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `protected static class` | `ClosureWriter.CorrectAccessedVariableVisitor` |
    `protected interface` | `ClosureWriter.UseExistingReference` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String` | `OUTER_INSTANCE` |
    `static String` | `THIS_OBJECT` |
    `protected WriterController` | `controller` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `ClosureWriter(WriterController controller)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected ConstructorNode` | `addConstructor(ClosureExpression expression, Parameter[] localVariableParams, InnerClassNode answer, BlockStatement block)`
    `` | `protected void` | `addFieldsAndGettersForLocalVariables(InnerClassNode closureClass, Parameter[] localVariableParams)`
    `` | `public boolean` | `addGeneratedClosureConstructorCall(ConstructorCallExpression call)`
    `` | `protected BlockStatement` | `createBlockStatementForConstructor(ClosureExpression expression, ClassNode outerClass, ClassNode thisClassNode)`
    `` | `protected ClassNode` | `createClosureClass(ClosureExpression expression, int modifiers)`
    `` | `protected Parameter[]` | `getClosureSharedVariables(ClosureExpression expression)`
    `` | `public ClassNode` | `getOrAddClosureClass(ClosureExpression expression, int modifiers)`
    `` | `public static void` | `loadReference(String name, WriterController controller)`
    `` | `protected void` | `loadThis()`
    `` | `protected static void` | `removeInitialValues(Parameter[] params)`
    `` | `public void` | `writeClosure(ClosureExpression expression)`

  - ### Inherited Methods Summary

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

- - ### Field Detail

    - #### public static final String OUTER_INSTANCE

    - #### public static final String THIS_OBJECT

    - #### protected final WriterController controller

  - ### Constructor Detail

    - #### public ClosureWriter(WriterController controller)

  - ### Method Detail

    - #### protected ConstructorNode addConstructor(ClosureExpression expression, Parameter[] localVariableParams, InnerClassNode answer, BlockStatement block)

    - #### protected void addFieldsAndGettersForLocalVariables(InnerClassNode closureClass, Parameter[] localVariableParams)

    - #### public boolean addGeneratedClosureConstructorCall(ConstructorCallExpression call)

    - #### protected BlockStatement createBlockStatementForConstructor(ClosureExpression expression, ClassNode outerClass, ClassNode thisClassNode)

    - #### protected ClassNode createClosureClass(ClosureExpression expression, int modifiers)

    - #### protected Parameter[] getClosureSharedVariables(ClosureExpression expression)

    - #### public ClassNode getOrAddClosureClass(ClosureExpression expression, int modifiers)

    - #### public static void loadReference(String name, WriterController controller)

    - #### protected void loadThis()

    - #### protected static void removeInitialValues(Parameter[] params)

    - #### public void writeClosure(ClosureExpression expression)