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

# Class StaticTypesLambdaWriter

java.lang.Object
org.codehaus.groovy.classgen.asm.ClosureWriter
org.codehaus.groovy.classgen.asm.LambdaWriter
org.codehaus.groovy.classgen.asm.sc.StaticTypesLambdaWriter

All Implemented Interfaces:
  `AbstractFunctionalInterfaceWriter`

public class StaticTypesLambdaWriter extends LambdaWriter implements AbstractFunctionalInterfaceWriter
Writer responsible for generating lambda classes in statically compiled mode.

- ## Nested Class Summary

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

  `ClosureWriter.CorrectAccessedVariableVisitor, ClosureWriter.UseExistingReference`

  ## Nested classes/interfaces inherited from interface org.codehaus.groovy.classgen.asm.sc.AbstractFunctionalInterfaceWriter

  `AbstractFunctionalInterfaceWriter.SerializedLambdaFingerprint`

- ## Field Summary

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

  `controller, GENERATED_CLOSURE_CLASS, OUTER_INSTANCE, PACKED_METHOD_PREFIX, THIS_OBJECT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StaticTypesLambdaWriter(WriterController controller)`
  Creates a lambda writer for statically compiled code generation.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected ClassNode`
  `createClosureClass(ClosureExpression expression, int modifiers)`
  Creates a new inner class node representing the compiled form of a closure expression.
  `protected ClassNode`
  `createLambdaClass(LambdaExpression expression, int modifiers, MethodNode abstractMethod)`
  Creates the synthetic inner class that backs a statically compiled lambda expression.
  `void`
  `writeLambda(LambdaExpression expression)`
  Generates bytecode for a lambda expression.

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

  `getLambdaSharedVariables`

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

  `addConstructor, addFieldsForLocalVariables, addGeneratedClosureConstructorCall, addSerialVersionUIDField, createBlockStatementForConstructor, getClosureSharedVariables, getOrAddClosureClass, isPackTriggered, loadReference, loadThis, markHoistedBody, packedClosureUsesDelegateGuard, readOnlyCaptureType, removeInitialValues, triggerDeclineReason, writeClosure, writePackedDispatcher`

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

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

  ### Methods inherited from interface org.codehaus.groovy.classgen.asm.sc.AbstractFunctionalInterfaceWriter

  `addDeserializeDispatcherEntry, convertParameterType, createCapturedReceiverParameter, createDeserializeMethodParameters, createFunctionalInterfaceFactoryDescriptor, createMethodDescriptor, createMethodDescriptor, createSerializedLambdaFingerprint, writeFunctionalInterfaceIndy, writeFunctionalInterfaceIndy`

- ## Constructor Details

  - ### StaticTypesLambdaWriter

    public StaticTypesLambdaWriter(WriterController controller)
    Creates a lambda writer for statically compiled code generation.

- ## Method Details

  - ### writeLambda

    public void writeLambda(LambdaExpression expression)
    Generates bytecode for a lambda expression.
    Overrides:
      `writeLambda` in class `LambdaWriter`
    Parameters:
      `expression` - the lambda expression to generate bytecode for

  - ### createClosureClass

    protected ClassNode createClosureClass(ClosureExpression expression, int modifiers)
    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
      `modifiers` - the access modifiers for the generated class
    Returns:
      the newly created closure class node

  - ### createLambdaClass

    protected ClassNode createLambdaClass(LambdaExpression expression, int modifiers, MethodNode abstractMethod)
    Creates the synthetic inner class that backs a statically compiled lambda expression.