public class ClosureWriter extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
ClosureWriter.CorrectAccessedVariableVisitor |
protected static interface |
ClosureWriter.UseExistingReference |
Modifier and Type | Field and Description |
---|---|
protected WriterController |
controller |
static String |
OUTER_INSTANCE |
static String |
THIS_OBJECT |
Constructor and Description |
---|
ClosureWriter(WriterController controller) |
public static final String OUTER_INSTANCE
public static final String THIS_OBJECT
protected final WriterController controller
public ClosureWriter(WriterController controller)
public void writeClosure(ClosureExpression expression)
public static void loadReference(String name, WriterController controller)
public ClassNode getOrAddClosureClass(ClosureExpression expression, int modifiers)
protected ClassNode createClosureClass(ClosureExpression expression, int modifiers)
protected ConstructorNode addConstructor(ClosureExpression expression, Parameter[] localVariableParams, InnerClassNode answer, BlockStatement block)
protected void addFieldsAndGettersForLocalVariables(InnerClassNode answer, Parameter[] localVariableParams)
protected BlockStatement createBlockStatementForConstructor(ClosureExpression expression, ClassNode outerClass, ClassNode thisClassNode)
protected static void removeInitialValues(Parameter[] params)
public boolean addGeneratedClosureConstructorCall(ConstructorCallExpression call)
protected Parameter[] getClosureSharedVariables(ClosureExpression ce)
protected void loadThis()