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.UseExistingReferenceNested 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, OUTER_INSTANCE, THIS_OBJECT -
Constructor Summary
ConstructorsConstructorDescriptionStaticTypesLambdaWriter(WriterController controller) Creates a lambda writer for statically compiled code generation. -
Method Summary
Modifier and TypeMethodDescriptionprotected ClassNodecreateClosureClass(ClosureExpression expression, int modifiers) Creates a new inner class node representing the compiled form of a closure expression.protected ClassNodecreateLambdaClass(LambdaExpression expression, int modifiers, MethodNode abstractMethod) Creates the synthetic inner class that backs a statically compiled lambda expression.voidwriteLambda(LambdaExpression expression) Generates bytecode for a lambda expression.Methods inherited from class org.codehaus.groovy.classgen.asm.LambdaWriter
getLambdaSharedVariablesMethods inherited from class org.codehaus.groovy.classgen.asm.ClosureWriter
addConstructor, addFieldsForLocalVariables, addGeneratedClosureConstructorCall, addSerialVersionUIDField, createBlockStatementForConstructor, getClosureSharedVariables, getOrAddClosureClass, loadReference, loadThis, removeInitialValues, writeClosureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.codehaus.groovy.classgen.asm.sc.AbstractFunctionalInterfaceWriter
addDeserializeDispatcherEntry, convertParameterType, createCapturedReceiverParameter, createDeserializeMethodParameters, createFunctionalInterfaceFactoryDescriptor, createMethodDescriptor, createMethodDescriptor, createSerializedLambdaFingerprint, writeFunctionalInterfaceIndy, writeFunctionalInterfaceIndy
-
Constructor Details
-
StaticTypesLambdaWriter
Creates a lambda writer for statically compiled code generation.
-
-
Method Details
-
writeLambda
Generates bytecode for a lambda expression.- Overrides:
writeLambdain classLambdaWriter- Parameters:
expression- the lambda expression to generate bytecode for
-
createClosureClass
Creates a new inner class node representing the compiled form of a closure expression.- Overrides:
createClosureClassin classClosureWriter- Parameters:
expression- the closure expression to compilemodifiers- 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.
-