protected static class ClosureWriter.CorrectAccessedVariableVisitor
extends CodeVisitorSupport
Visitor that rewrites VariableExpression nodes whose accessed variable is a FieldNode in an outer class to instead reference the corresponding field in the generated closure inner class.
| Constructor and description |
|---|
CorrectAccessedVariableVisitor(InnerClassNode icn)Creates a visitor for the generated closure class. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
visitVariableExpression(VariableExpression expression)* Visits a VariableExpression. No traversal is performed as variable expressions contain no child expressions. * *
|
Creates a visitor for the generated closure class.
icn - the generated closure class* Visits a VariableExpression. No traversal is performed as variable expressions contain no child expressions. * *
expression - the variable expressionCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.