Package org.codehaus.groovy.classgen.asm
Class ClosureWriter
- java.lang.Object
-
- org.codehaus.groovy.classgen.asm.ClosureWriter
-
- Direct Known Subclasses:
LambdaWriter
,StaticTypesClosureWriter
public class ClosureWriter extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
ClosureWriter.CorrectAccessedVariableVisitor
protected static interface
ClosureWriter.UseExistingReference
-
Field Summary
Fields Modifier and Type Field Description protected WriterController
controller
static String
OUTER_INSTANCE
static String
THIS_OBJECT
-
Constructor Summary
Constructors Constructor Description ClosureWriter(WriterController controller)
-
Method Summary
-
-
-
Field Detail
-
OUTER_INSTANCE
public static final String OUTER_INSTANCE
- See Also:
- Constant Field Values
-
THIS_OBJECT
public static final String THIS_OBJECT
- See Also:
- Constant Field Values
-
controller
protected final WriterController controller
-
-
Constructor Detail
-
ClosureWriter
public ClosureWriter(WriterController controller)
-
-
Method Detail
-
writeClosure
public void writeClosure(ClosureExpression expression)
-
loadReference
public static void loadReference(String name, WriterController controller)
-
getOrAddClosureClass
public ClassNode getOrAddClosureClass(ClosureExpression expression, int modifiers)
-
createClosureClass
protected ClassNode createClosureClass(ClosureExpression expression, int modifiers)
-
addConstructor
protected ConstructorNode addConstructor(ClosureExpression expression, Parameter[] localVariableParams, InnerClassNode answer, BlockStatement block)
-
addFieldsAndGettersForLocalVariables
protected void addFieldsAndGettersForLocalVariables(InnerClassNode answer, Parameter[] localVariableParams)
-
createBlockStatementForConstructor
protected BlockStatement createBlockStatementForConstructor(ClosureExpression expression, ClassNode outerClass, ClassNode thisClassNode)
-
removeInitialValues
protected static void removeInitialValues(Parameter[] params)
-
addGeneratedClosureConstructorCall
public boolean addGeneratedClosureConstructorCall(ConstructorCallExpression call)
-
getClosureSharedVariables
protected Parameter[] getClosureSharedVariables(ClosureExpression ce)
-
loadThis
protected void loadThis()
-
-