Groovy 2.2.0

org.codehaus.groovy.classgen
[Java] Class VariableScopeVisitor

java.lang.Object
  org.codehaus.groovy.ast.CodeVisitorSupport
      org.codehaus.groovy.ast.ClassCodeVisitorSupport
          org.codehaus.groovy.classgen.VariableScopeVisitor

public class VariableScopeVisitor
extends ClassCodeVisitorSupport

goes through an AST and initializes the scopes

Authors:
Jochen Theodorou


Method Summary
def VariableScopeVisitor(SourceUnit source)

protected SourceUnit getSourceUnit()

void prepareVisit(ClassNode node)

void visitAnnotations(AnnotatedNode node)

void visitBinaryExpression(BinaryExpression be)

void visitBlockStatement(BlockStatement block)

void visitCatchStatement(CatchStatement statement)

void visitClass(ClassNode node)

Setup the current class node context.

void visitClosureExpression(ClosureExpression expression)

void visitConstructorCallExpression(ConstructorCallExpression call)

protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor)

void visitDeclarationExpression(DeclarationExpression expression)

void visitField(FieldNode node)

void visitFieldExpression(FieldExpression expression)

void visitForLoop(ForStatement forLoop)

void visitIfElse(IfStatement ifElse)

void visitMethodCallExpression(MethodCallExpression call)

void visitProperty(PropertyNode node)

void visitPropertyExpression(PropertyExpression expression)

void visitVariableExpression(VariableExpression expression)

 
Methods inherited from class ClassCodeVisitorSupport
visitMethod, visitField, visitReturnStatement, visitProperty, visitConstructor, visitForLoop, visitSwitch, visitWhileLoop, visitDoWhileLoop, visitExpressionStatement, visitBlockStatement, visitPackage, visitClass, visitAnnotations, visitCatchStatement, visitIfElse, visitAssertStatement, visitCaseStatement, visitSynchronizedStatement, visitThrowStatement, visitImports, visitDeclarationExpression, visitBreakStatement, visitContinueStatement, visitTryCatchFinally, visitClassExpression, visitConstantExpression, visitListExpression, visitPropertyExpression, visitMethodCallExpression, visitStaticMethodCallExpression, visitConstructorCallExpression, visitBinaryExpression, visitTernaryExpression, visitShortTernaryExpression, visitPostfixExpression, visitPrefixExpression, visitBooleanExpression, visitNotExpression, visitClosureExpression, visitTupleExpression, visitArrayExpression, visitMapExpression, visitMapEntryExpression, visitRangeExpression, visitSpreadExpression, visitSpreadMapExpression, visitMethodPointerExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitBitwiseNegationExpression, visitCastExpression, visitVariableExpression, visitAttributeExpression, visitFieldExpression, visitGStringExpression, visitArgumentlistExpression, visitClosureListExpression, visitBytecodeExpression, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 
Methods inherited from class CodeVisitorSupport
visitClassExpression, visitConstantExpression, visitListExpression, visitReturnStatement, visitPropertyExpression, visitForLoop, visitSwitch, visitWhileLoop, visitDoWhileLoop, visitExpressionStatement, visitBlockStatement, visitCatchStatement, visitIfElse, visitAssertStatement, visitCaseStatement, visitSynchronizedStatement, visitThrowStatement, visitDeclarationExpression, visitBreakStatement, visitContinueStatement, visitTryCatchFinally, visitMethodCallExpression, visitStaticMethodCallExpression, visitConstructorCallExpression, visitBinaryExpression, visitTernaryExpression, visitShortTernaryExpression, visitPostfixExpression, visitPrefixExpression, visitBooleanExpression, visitNotExpression, visitClosureExpression, visitTupleExpression, visitArrayExpression, visitMapExpression, visitMapEntryExpression, visitRangeExpression, visitSpreadExpression, visitSpreadMapExpression, visitMethodPointerExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitBitwiseNegationExpression, visitCastExpression, visitVariableExpression, visitAttributeExpression, visitFieldExpression, visitGStringExpression, visitArgumentlistExpression, visitClosureListExpression, visitBytecodeExpression, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Method Detail

VariableScopeVisitor

public def VariableScopeVisitor(SourceUnit source)


getSourceUnit

protected SourceUnit getSourceUnit()


prepareVisit

public void prepareVisit(ClassNode node)


visitAnnotations

public void visitAnnotations(AnnotatedNode node)


visitBinaryExpression

@Overridebreak;
public void visitBinaryExpression(BinaryExpression be)


visitBlockStatement

public void visitBlockStatement(BlockStatement block)


visitCatchStatement

public void visitCatchStatement(CatchStatement statement)


visitClass

public void visitClass(ClassNode node)
Setup the current class node context.
Parameters:
node


visitClosureExpression

public void visitClosureExpression(ClosureExpression expression)


visitConstructorCallExpression

public void visitConstructorCallExpression(ConstructorCallExpression call)


visitConstructorOrMethod

protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor)


visitDeclarationExpression

public void visitDeclarationExpression(DeclarationExpression expression)


visitField

public void visitField(FieldNode node)


visitFieldExpression

public void visitFieldExpression(FieldExpression expression)


visitForLoop

public void visitForLoop(ForStatement forLoop)


visitIfElse

public void visitIfElse(IfStatement ifElse)


visitMethodCallExpression

public void visitMethodCallExpression(MethodCallExpression call)


visitProperty

public void visitProperty(PropertyNode node)


visitPropertyExpression

public void visitPropertyExpression(PropertyExpression expression)


visitVariableExpression

public void visitVariableExpression(VariableExpression expression)


 

Copyright © 2003-2013 The Codehaus. All rights reserved.