Package org.codehaus.groovy.classgen.asm

# Class LambdaWriter

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

Direct Known Subclasses:
  `StaticTypesLambdaWriter`

public class LambdaWriter extends ClosureWriter
Generates bytecode for lambda expressions.

- ## 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, GENERATED_CLOSURE_CLASS, OUTER_INSTANCE, PACKED_METHOD_PREFIX, THIS_OBJECT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LambdaWriter(WriterController controller)`
  Creates a lambda writer with the given controller.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected Parameter[]`
  `getLambdaSharedVariables(LambdaExpression expression)`
  Gets the shared variables for a lambda expression.
  `void`
  `writeLambda(LambdaExpression expression)`
  Generates bytecode for a lambda expression.

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

  `addConstructor, addFieldsForLocalVariables, addGeneratedClosureConstructorCall, addSerialVersionUIDField, createBlockStatementForConstructor, createClosureClass, 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`

- ## Constructor Details

  - ### LambdaWriter

    public LambdaWriter(WriterController controller)
    Creates a lambda writer with the given controller.
    Parameters:
      `controller` - the writer controller

- ## Method Details

  - ### writeLambda

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

  - ### getLambdaSharedVariables

    protected Parameter[] getLambdaSharedVariables(LambdaExpression expression)
    Gets the shared variables for a lambda expression.
    Parameters:
      `expression` - the lambda expression
    Returns:
      the shared variables