Package: org.codehaus.groovy.classgen

## [Java] Class VariableScopeVisitor

- org.codehaus.groovy.classgen.VariableScopeVisitor

-     public class VariableScopeVisitor
      extends ClassCodeVisitorSupport

  Initializes the variable scopes for an AST.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `VariableScopeVisitor (SourceUnit source, boolean recurseInnerClasses)`
    `VariableScopeVisitor (SourceUnit source)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected SourceUnit` | `getSourceUnit()`
    `` | `void` | `prepareVisit(ClassNode node)` Sets the current class node context.
    `` | `void` | `visitBinaryExpression(BinaryExpression expression)`
    `` | `void` | `visitBlockStatement(BlockStatement statement)`
    `` | `void` | `visitCatchStatement(CatchStatement statement)`
    `` | `void` | `visitClass(ClassNode node)`
    `` | `void` | `visitClosureExpression(ClosureExpression expression)`
    `` | `void` | `visitConstructorCallExpression(ConstructorCallExpression expression)`
    `` | `protected void` | `visitConstructorOrMethod(MethodNode node, boolean isConstructor)`
    `` | `void` | `visitDeclarationExpression(DeclarationExpression expression)`
    `` | `void` | `visitField(FieldNode node)`
    `` | `void` | `visitFieldExpression(FieldExpression expression)`
    `` | `void` | `visitForLoop(ForStatement statement)`
    `` | `void` | `visitIfElse(IfStatement statement)`
    `` | `void` | `visitMethodCallExpression(MethodCallExpression expression)`
    `` | `void` | `visitProperty(PropertyNode node)`
    `` | `void` | `visitPropertyExpression(PropertyExpression expression)`
    `` | `void` | `visitVariableExpression(VariableExpression expression)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class ClassCodeVisitorSupport` | `addError, getSourceUnit, visitAnnotation, visitAnnotations, visitAssertStatement, visitBlockStatement, visitBreakStatement, visitCaseStatement, visitCatchStatement, visitClass, visitClassCodeContainer, visitConstructor, visitConstructorOrMethod, visitContinueStatement, visitDeclarationExpression, visitDoWhileLoop, visitExpressionStatement, visitField, visitForLoop, visitIfElse, visitImports, visitMethod, visitObjectInitializerStatements, visitPackage, visitProperty, visitReturnStatement, visitStatement, visitSwitch, visitSynchronizedStatement, visitThrowStatement, visitTryCatchFinally, visitWhileLoop`
    `class CodeVisitorSupport` | `afterSwitchConditionExpressionVisited, visitArgumentlistExpression, visitArrayExpression, visitAssertStatement, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBlockStatement, visitBooleanExpression, visitBreakStatement, visitBytecodeExpression, visitCaseStatement, visitCastExpression, visitCatchStatement, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitConstructorCallExpression, visitContinueStatement, visitDeclarationExpression, visitDoWhileLoop, visitEmptyStatement, visitExpressionStatement, visitFieldExpression, visitForLoop, visitGStringExpression, visitIfElse, visitLambdaExpression, visitListExpression, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitMethodReferenceExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitReturnStatement, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitSwitch, visitSynchronizedStatement, visitTernaryExpression, visitThrowStatement, visitTryCatchFinally, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression, visitWhileLoop`

- - ### Constructor Detail

    - #### public VariableScopeVisitor(SourceUnit source, boolean recurseInnerClasses)

    - #### public VariableScopeVisitor(SourceUnit source)

  - ### Method Detail

    - #### @Override protected SourceUnit getSourceUnit()

    - #### public void prepareVisit(ClassNode node)

      Sets the current class node context.

    - #### @Override public void visitBinaryExpression(BinaryExpression expression)

    - #### @Override public void visitBlockStatement(BlockStatement statement)

    - #### @Override public void visitCatchStatement(CatchStatement statement)

    - #### @Override public void visitClass(ClassNode node)

    - #### @Override public void visitClosureExpression(ClosureExpression expression)

    - #### @Override public void visitConstructorCallExpression(ConstructorCallExpression expression)

    - #### @Override protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor)

    - #### @Override public void visitDeclarationExpression(DeclarationExpression expression)

    - #### @Override public void visitField(FieldNode node)

    - #### @Override public void visitFieldExpression(FieldExpression expression)

    - #### @Override public void visitForLoop(ForStatement statement)

    - #### @Override public void visitIfElse(IfStatement statement)

    - #### @Override public void visitMethodCallExpression(MethodCallExpression expression)

    - #### @Override public void visitProperty(PropertyNode node)

    - #### @Override public void visitPropertyExpression(PropertyExpression expression)

    - #### @Override public void visitVariableExpression(VariableExpression expression)