Package org.codehaus.groovy.classgen.asm.sc

# Class StaticTypesClosureWriter

java.lang.Object
org.codehaus.groovy.classgen.asm.ClosureWriter
org.codehaus.groovy.classgen.asm.sc.StaticTypesClosureWriter

public class StaticTypesClosureWriter extends ClosureWriter
Writer responsible for generating closure classes in statically compiled mode.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.codehaus.groovy.classgen.asm.ClosureWriter

  `ClosureWriter.CorrectAccessedVariableVisitor, ClosureWriter.UseExistingReference`

- ## Field Summary

  ### Fields inherited from class org.codehaus.groovy.classgen.asm.ClosureWriter

  `controller, OUTER_INSTANCE, THIS_OBJECT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StaticTypesClosureWriter(WriterController wc)`
  Creates a closure writer for statically compiled code generation.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected ClassNode`
  `createClosureClass(ClosureExpression expression, int mods)`
  Creates a new inner class node representing the compiled form of a closure expression.

  ### Methods inherited from class org.codehaus.groovy.classgen.asm.ClosureWriter

  `addConstructor, addFieldsForLocalVariables, addGeneratedClosureConstructorCall, addSerialVersionUIDField, createBlockStatementForConstructor, getClosureSharedVariables, getOrAddClosureClass, loadReference, loadThis, removeInitialValues, writeClosure`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### StaticTypesClosureWriter

    public StaticTypesClosureWriter(WriterController wc)
    Creates a closure writer for statically compiled code generation.

- ## Method Details

  - ### createClosureClass

    protected ClassNode createClosureClass(ClosureExpression expression, int mods)
    Creates a new inner class node representing the compiled form of a closure expression.
    Overrides:
      `createClosureClass` in class `ClosureWriter`
    Parameters:
      `expression` - the closure expression to compile
      `mods` - the access modifiers for the generated class
    Returns:
      the newly created closure class node