Package: org.codehaus.groovy.classgen

## [Java] Class VariableScopeVisitor

- org.codehaus.groovy.classgen.VariableScopeVisitor

- 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

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride protected SourceUnit getSourceUnit()

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

      Sets the current class node context.

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitBinaryExpression(BinaryExpression expression)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitBlockStatement(BlockStatement statement)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitCatchStatement(CatchStatement statement)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitClass(ClassNode node)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitClosureExpression(ClosureExpression expression)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitConstructorCallExpression(ConstructorCallExpression expression)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitDeclarationExpression(DeclarationExpression expression)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitField(FieldNode node)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitFieldExpression(FieldExpression expression)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitForLoop(ForStatement statement)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitIfElse(IfStatement statement)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitMethodCallExpression(MethodCallExpression expression)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitProperty(PropertyNode node)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitPropertyExpression(PropertyExpression expression)

    - #### @com.github.javaparser.ast.expr.MarkerAnnotationExprOverride public void visitVariableExpression(VariableExpression expression)