Package org.codehaus.groovy.control
Class LabelVerifier
- java.lang.Object
-
- org.codehaus.groovy.ast.CodeVisitorSupport
-
- org.codehaus.groovy.ast.ClassCodeVisitorSupport
-
- org.codehaus.groovy.control.LabelVerifier
-
- All Implemented Interfaces:
GroovyClassVisitor
,GroovyCodeVisitor
,ErrorCollecting
public class LabelVerifier extends ClassCodeVisitorSupport
This class checks the handling of labels in the AST
-
-
Constructor Summary
Constructors Constructor Description LabelVerifier(SourceUnit src)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
assertNoLabelsMissed()
protected SourceUnit
getSourceUnit()
void
visitBreakStatement(BreakStatement statement)
protected void
visitClassCodeContainer(Statement code)
void
visitContinueStatement(ContinueStatement statement)
void
visitDoWhileLoop(DoWhileStatement loop)
void
visitForLoop(ForStatement forLoop)
void
visitStatement(Statement statement)
void
visitSwitch(SwitchStatement statement)
void
visitWhileLoop(WhileStatement loop)
-
Methods inherited from class org.codehaus.groovy.ast.ClassCodeVisitorSupport
addError, visitAnnotation, visitAnnotations, visitAssertStatement, visitBlockStatement, visitCaseStatement, visitCatchStatement, visitClass, visitConstructor, visitConstructorOrMethod, visitDeclarationExpression, visitExpressionStatement, visitField, visitIfElse, visitImports, visitMethod, visitObjectInitializerStatements, visitPackage, visitProperty, visitReturnStatement, visitSynchronizedStatement, visitThrowStatement, visitTryCatchFinally
-
Methods inherited from class org.codehaus.groovy.ast.CodeVisitorSupport
afterSwitchConditionExpressionVisited, visitArgumentlistExpression, visitArrayExpression, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBooleanExpression, visitBytecodeExpression, visitCastExpression, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitConstructorCallExpression, visitEmptyStatement, visitFieldExpression, visitGStringExpression, visitLambdaExpression, visitListExpression, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitMethodReferenceExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitTernaryExpression, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.codehaus.groovy.ast.GroovyCodeVisitor
visitEmptyExpression, visitListOfExpressions
-
-
-
-
Constructor Detail
-
LabelVerifier
public LabelVerifier(SourceUnit src)
-
-
Method Detail
-
getSourceUnit
protected SourceUnit getSourceUnit()
- Specified by:
getSourceUnit
in classClassCodeVisitorSupport
-
visitClassCodeContainer
protected void visitClassCodeContainer(Statement code)
- Overrides:
visitClassCodeContainer
in classClassCodeVisitorSupport
-
visitStatement
public void visitStatement(Statement statement)
- Overrides:
visitStatement
in classClassCodeVisitorSupport
-
visitForLoop
public void visitForLoop(ForStatement forLoop)
- Specified by:
visitForLoop
in interfaceGroovyCodeVisitor
- Overrides:
visitForLoop
in classClassCodeVisitorSupport
-
visitDoWhileLoop
public void visitDoWhileLoop(DoWhileStatement loop)
- Specified by:
visitDoWhileLoop
in interfaceGroovyCodeVisitor
- Overrides:
visitDoWhileLoop
in classClassCodeVisitorSupport
-
visitWhileLoop
public void visitWhileLoop(WhileStatement loop)
- Specified by:
visitWhileLoop
in interfaceGroovyCodeVisitor
- Overrides:
visitWhileLoop
in classClassCodeVisitorSupport
-
visitBreakStatement
public void visitBreakStatement(BreakStatement statement)
- Specified by:
visitBreakStatement
in interfaceGroovyCodeVisitor
- Overrides:
visitBreakStatement
in classClassCodeVisitorSupport
-
visitContinueStatement
public void visitContinueStatement(ContinueStatement statement)
- Specified by:
visitContinueStatement
in interfaceGroovyCodeVisitor
- Overrides:
visitContinueStatement
in classClassCodeVisitorSupport
-
assertNoLabelsMissed
protected void assertNoLabelsMissed()
-
visitSwitch
public void visitSwitch(SwitchStatement statement)
- Specified by:
visitSwitch
in interfaceGroovyCodeVisitor
- Overrides:
visitSwitch
in classClassCodeVisitorSupport
-
-