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()`
    `` | `public void` | `prepareVisit(ClassNode node)` Sets the current class node context.
    `` | `public void` | `visitBinaryExpression(BinaryExpression expression)`
    `` | `public void` | `visitBlockStatement(BlockStatement statement)`
    `` | `public void` | `visitCatchStatement(CatchStatement statement)`
    `` | `public void` | `visitClass(ClassNode node)`
    `` | `public void` | `visitClosureExpression(ClosureExpression expression)`
    `` | `public void` | `visitConstructorCallExpression(ConstructorCallExpression expression)`
    `` | `protected void` | `visitConstructorOrMethod(MethodNode node, boolean isConstructor)`
    `` | `public void` | `visitDeclarationExpression(DeclarationExpression expression)`
    `` | `public void` | `visitField(FieldNode node)`
    `` | `public void` | `visitFieldExpression(FieldExpression expression)`
    `` | `public void` | `visitForLoop(ForStatement statement)`
    `` | `public void` | `visitIfElse(IfStatement statement)`
    `` | `public void` | `visitMethodCallExpression(MethodCallExpression expression)`
    `` | `public void` | `visitProperty(PropertyNode node)`
    `` | `public void` | `visitPropertyExpression(PropertyExpression expression)`
    `` | `public 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)