Package org.codehaus.groovy.classgen.asm
Class ClosureWriter
java.lang.Object
org.codehaus.groovy.classgen.asm.ClosureWriter
- Direct Known Subclasses:
LambdaWriter
,StaticTypesClosureWriter
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
protected static interface
-
Field Summary
Modifier and TypeFieldDescriptionprotected final WriterController
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ConstructorNode
addConstructor
(ClosureExpression expression, Parameter[] localVariableParams, InnerClassNode answer, BlockStatement block) protected void
addFieldsAndGettersForLocalVariables
(InnerClassNode closureClass, Parameter[] localVariableParams) boolean
protected BlockStatement
createBlockStatementForConstructor
(ClosureExpression expression, ClassNode outerClass, ClassNode thisClassNode) protected ClassNode
createClosureClass
(ClosureExpression expression, int modifiers) protected Parameter[]
getClosureSharedVariables
(ClosureExpression expression) getOrAddClosureClass
(ClosureExpression expression, int modifiers) static void
loadReference
(String name, WriterController controller) protected void
loadThis()
protected static void
removeInitialValues
(Parameter[] params) void
writeClosure
(ClosureExpression expression)
-
Field Details
-
OUTER_INSTANCE
- See Also:
-
THIS_OBJECT
- See Also:
-
controller
-
-
Constructor Details
-
ClosureWriter
-
-
Method Details
-
writeClosure
-
loadReference
-
getOrAddClosureClass
-
createClosureClass
-
addConstructor
protected ConstructorNode addConstructor(ClosureExpression expression, Parameter[] localVariableParams, InnerClassNode answer, BlockStatement block) -
addFieldsAndGettersForLocalVariables
protected void addFieldsAndGettersForLocalVariables(InnerClassNode closureClass, Parameter[] localVariableParams) -
createBlockStatementForConstructor
protected BlockStatement createBlockStatementForConstructor(ClosureExpression expression, ClassNode outerClass, ClassNode thisClassNode) -
removeInitialValues
-
addGeneratedClosureConstructorCall
-
loadThis
protected void loadThis()
-