VerifierCodeVisitor (Groovy 5.0.6)
Description: declaration: package: org.codehaus.groovy.classgen, class: VerifierCodeVisitor

Package org.codehaus.groovy.classgen

# Class VerifierCodeVisitor

java.lang.Object
org.codehaus.groovy.ast.CodeVisitorSupport
org.codehaus.groovy.classgen.VerifierCodeVisitor

All Implemented Interfaces:
  `GroovyCodeVisitor`

public class VerifierCodeVisitor extends CodeVisitorSupport
Performs various checks on code inside methods and constructors including checking for valid field, variables names etc. that would otherwise lead to invalid code.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VerifierCodeVisitor(ClassNode classNode)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `assertValidIdentifier(String name, String message, ASTNode node)`
  `void`
  `visitConstructorCallExpression(ConstructorCallExpression call)`
  `void`
  `visitFieldExpression(FieldExpression expression)`
  `void`
  `visitForLoop(ForStatement statement)`
  `void`
  `visitListExpression(ListExpression expression)`
  `void`
  `visitVariableExpression(VariableExpression expression)`

  ### Methods inherited from class org.codehaus.groovy.ast.CodeVisitorSupport

  `afterSwitchCaseStatementsVisited, afterSwitchConditionExpressionVisited, visitArgumentlistExpression, visitArrayExpression, visitAssertStatement, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBlockStatement, visitBooleanExpression, visitBreakStatement, visitBytecodeExpression, visitCaseStatement, visitCastExpression, visitCatchStatement, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitContinueStatement, visitDeclarationExpression, visitDoWhileLoop, visitEmptyStatement, visitExpressionStatement, visitGStringExpression, visitIfElse, visitLambdaExpression, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitMethodReferenceExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitReturnStatement, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitSwitch, visitSynchronizedStatement, visitTernaryExpression, visitThrowStatement, visitTryCatchFinally, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitWhileLoop`

  ### 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

  `visit, visit, visitEmptyExpression, visitListOfExpressions`

- ## Constructor Details

  - ### VerifierCodeVisitor

    public VerifierCodeVisitor(ClassNode classNode)

- ## Method Details

  - ### visitForLoop

    public void visitForLoop(ForStatement statement)
    Specified by:
      `visitForLoop` in interface `GroovyCodeVisitor`
    Overrides:
      `visitForLoop` in class `CodeVisitorSupport`

  - ### visitFieldExpression

    public void visitFieldExpression(FieldExpression expression)
    Specified by:
      `visitFieldExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitFieldExpression` in class `CodeVisitorSupport`

  - ### visitVariableExpression

    public void visitVariableExpression(VariableExpression expression)
    Specified by:
      `visitVariableExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitVariableExpression` in class `CodeVisitorSupport`

  - ### visitListExpression

    public void visitListExpression(ListExpression expression)
    Specified by:
      `visitListExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitListExpression` in class `CodeVisitorSupport`

  - ### visitConstructorCallExpression

    public void visitConstructorCallExpression(ConstructorCallExpression call)
    Specified by:
      `visitConstructorCallExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitConstructorCallExpression` in class `CodeVisitorSupport`

  - ### assertValidIdentifier

    public static void assertValidIdentifier(String name, String message, ASTNode node)