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(java.lang.String name, java.lang.String message, ASTNode node)
void
visitConstructorCallExpression(ConstructorCallExpression call)
void
visitFieldExpression(FieldExpression expression)
void
visitForLoop(ForStatement expression)
void
visitListExpression(ListExpression expression)
void
visitVariableExpression(VariableExpression expression)
Methods inherited from class org.codehaus.groovy.ast.CodeVisitorSupport
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
visitEmptyExpression, visitListOfExpressions
-
Constructor Details
-
VerifierCodeVisitor
-
-
Method Details
-
visitForLoop
- Specified by:
visitForLoop
in interfaceGroovyCodeVisitor
- Overrides:
visitForLoop
in classCodeVisitorSupport
-
visitFieldExpression
- Specified by:
visitFieldExpression
in interfaceGroovyCodeVisitor
- Overrides:
visitFieldExpression
in classCodeVisitorSupport
-
visitVariableExpression
- Specified by:
visitVariableExpression
in interfaceGroovyCodeVisitor
- Overrides:
visitVariableExpression
in classCodeVisitorSupport
-
visitListExpression
- Specified by:
visitListExpression
in interfaceGroovyCodeVisitor
- Overrides:
visitListExpression
in classCodeVisitorSupport
-
visitConstructorCallExpression
- Specified by:
visitConstructorCallExpression
in interfaceGroovyCodeVisitor
- Overrides:
visitConstructorCallExpression
in classCodeVisitorSupport
-
assertValidIdentifier
public static void assertValidIdentifier(java.lang.String name, java.lang.String message, ASTNode node)
-