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
All Methods Static Methods Instance Methods Concrete Methods 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
visitArgumentlistExpression, visitArrayExpression, visitAssertStatement, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBlockStatement, visitBooleanExpression, visitBreakStatement, visitBytecodeExpression, visitCaseStatement, visitCastExpression, visitCatchStatement, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitContinueStatement, visitDeclarationExpression, visitDoWhileLoop, visitEmptyStatement, visitExpressionStatement, visitGStringExpression, visitIfElse, visitListOfExpressions, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitReturnStatement, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitSwitch, visitSynchronizedStatement, visitTernaryExpression, visitThrowStatement, visitTryCatchFinally, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitWhileLoop
-
-
-
-
Constructor Detail
-
VerifierCodeVisitor
public VerifierCodeVisitor(ClassNode classNode)
-
-
Method Detail
-
visitForLoop
public void visitForLoop(ForStatement expression)
- Specified by:
visitForLoop
in interfaceGroovyCodeVisitor
- Overrides:
visitForLoop
in classCodeVisitorSupport
-
visitFieldExpression
public void visitFieldExpression(FieldExpression expression)
- Specified by:
visitFieldExpression
in interfaceGroovyCodeVisitor
- Overrides:
visitFieldExpression
in classCodeVisitorSupport
-
visitVariableExpression
public void visitVariableExpression(VariableExpression expression)
- Specified by:
visitVariableExpression
in interfaceGroovyCodeVisitor
- Overrides:
visitVariableExpression
in classCodeVisitorSupport
-
visitListExpression
public void visitListExpression(ListExpression expression)
- Specified by:
visitListExpression
in interfaceGroovyCodeVisitor
- Overrides:
visitListExpression
in classCodeVisitorSupport
-
visitConstructorCallExpression
public void visitConstructorCallExpression(ConstructorCallExpression call)
- Specified by:
visitConstructorCallExpression
in interfaceGroovyCodeVisitor
- Overrides:
visitConstructorCallExpression
in classCodeVisitorSupport
-
assertValidIdentifier
public static void assertValidIdentifier(java.lang.String name, java.lang.String message, ASTNode node)
-
-