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

  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 Details

  - ### LabelVerifier

    public LabelVerifier​(SourceUnit src)

- ## Method Details

  - ### getSourceUnit

    protected SourceUnit getSourceUnit()
    Specified by:
      `getSourceUnit` in class `ClassCodeVisitorSupport`

  - ### visitClassCodeContainer

    protected void visitClassCodeContainer​(Statement code)
    Overrides:
      `visitClassCodeContainer` in class `ClassCodeVisitorSupport`

  - ### visitStatement

    public void visitStatement​(Statement statement)
    Overrides:
      `visitStatement` in class `ClassCodeVisitorSupport`

  - ### visitForLoop

    public void visitForLoop​(ForStatement forLoop)
    Specified by:
      `visitForLoop` in interface `GroovyCodeVisitor`
    Overrides:
      `visitForLoop` in class `ClassCodeVisitorSupport`

  - ### visitDoWhileLoop

    public void visitDoWhileLoop​(DoWhileStatement loop)
    Specified by:
      `visitDoWhileLoop` in interface `GroovyCodeVisitor`
    Overrides:
      `visitDoWhileLoop` in class `ClassCodeVisitorSupport`

  - ### visitWhileLoop

    public void visitWhileLoop​(WhileStatement loop)
    Specified by:
      `visitWhileLoop` in interface `GroovyCodeVisitor`
    Overrides:
      `visitWhileLoop` in class `ClassCodeVisitorSupport`

  - ### visitBreakStatement

    public void visitBreakStatement​(BreakStatement statement)
    Specified by:
      `visitBreakStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitBreakStatement` in class `ClassCodeVisitorSupport`

  - ### visitContinueStatement

    public void visitContinueStatement​(ContinueStatement statement)
    Specified by:
      `visitContinueStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitContinueStatement` in class `ClassCodeVisitorSupport`

  - ### assertNoLabelsMissed

    protected void assertNoLabelsMissed()

  - ### visitSwitch

    public void visitSwitch​(SwitchStatement statement)
    Specified by:
      `visitSwitch` in interface `GroovyCodeVisitor`
    Overrides:
      `visitSwitch` in class `ClassCodeVisitorSupport`