Groovy 2.2.0

org.codehaus.groovy.classgen
[Java] Class ExtendedVerifier

java.lang.Object
  org.codehaus.groovy.ast.CodeVisitorSupport
      org.codehaus.groovy.ast.ClassCodeVisitorSupport
          org.codehaus.groovy.classgen.ExtendedVerifier
All Implemented Interfaces:
GroovyClassVisitor

public class ExtendedVerifier
extends ClassCodeVisitorSupport

A specialized Groovy AST visitor meant to perform additional verifications upon the current AST. Currently it does checks on annotated nodes and annotations itself.

Current limitations: - annotations on local variables are not supported

Authors:
Alex Popescu


Field Summary
static String JVM_ERROR_MESSAGE

 
Constructor Summary
ExtendedVerifier(SourceUnit sourceUnit)

 
Method Summary
protected void addError(String msg, ASTNode expr)

protected SourceUnit getSourceUnit()

protected boolean isAnnotationCompatible()

Check if the current runtime allows Annotation usage.

protected void visitAnnotations(AnnotatedNode node, int target)

void visitClass(ClassNode node)

void visitConstructor(ConstructorNode node)

void visitDeclarationExpression(DeclarationExpression expression)

void visitField(FieldNode node)

void visitGenericType(GenericsType genericsType)

void visitMethod(MethodNode node)

void visitProperty(PropertyNode node)

 
Methods inherited from class ClassCodeVisitorSupport
visitMethod, visitField, visitReturnStatement, visitProperty, visitConstructor, visitForLoop, visitSwitch, visitWhileLoop, visitDoWhileLoop, visitExpressionStatement, visitBlockStatement, visitPackage, visitClass, visitAnnotations, visitCatchStatement, visitIfElse, visitAssertStatement, visitCaseStatement, visitSynchronizedStatement, visitThrowStatement, visitImports, visitDeclarationExpression, visitBreakStatement, visitContinueStatement, visitTryCatchFinally, visitClassExpression, visitConstantExpression, visitListExpression, visitPropertyExpression, visitMethodCallExpression, visitStaticMethodCallExpression, visitConstructorCallExpression, visitBinaryExpression, visitTernaryExpression, visitShortTernaryExpression, visitPostfixExpression, visitPrefixExpression, visitBooleanExpression, visitNotExpression, visitClosureExpression, visitTupleExpression, visitArrayExpression, visitMapExpression, visitMapEntryExpression, visitRangeExpression, visitSpreadExpression, visitSpreadMapExpression, visitMethodPointerExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitBitwiseNegationExpression, visitCastExpression, visitVariableExpression, visitAttributeExpression, visitFieldExpression, visitGStringExpression, visitArgumentlistExpression, visitClosureListExpression, visitBytecodeExpression, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 
Methods inherited from class CodeVisitorSupport
visitClassExpression, visitConstantExpression, visitListExpression, visitReturnStatement, visitPropertyExpression, visitForLoop, visitSwitch, visitWhileLoop, visitDoWhileLoop, visitExpressionStatement, visitBlockStatement, visitCatchStatement, visitIfElse, visitAssertStatement, visitCaseStatement, visitSynchronizedStatement, visitThrowStatement, visitDeclarationExpression, visitBreakStatement, visitContinueStatement, visitTryCatchFinally, visitMethodCallExpression, visitStaticMethodCallExpression, visitConstructorCallExpression, visitBinaryExpression, visitTernaryExpression, visitShortTernaryExpression, visitPostfixExpression, visitPrefixExpression, visitBooleanExpression, visitNotExpression, visitClosureExpression, visitTupleExpression, visitArrayExpression, visitMapExpression, visitMapEntryExpression, visitRangeExpression, visitSpreadExpression, visitSpreadMapExpression, visitMethodPointerExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitBitwiseNegationExpression, visitCastExpression, visitVariableExpression, visitAttributeExpression, visitFieldExpression, visitGStringExpression, visitArgumentlistExpression, visitClosureListExpression, visitBytecodeExpression, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

JVM_ERROR_MESSAGE

public static final String JVM_ERROR_MESSAGE


 
Constructor Detail

ExtendedVerifier

public ExtendedVerifier(SourceUnit sourceUnit)


 
Method Detail

addError

protected void addError(String msg, ASTNode expr)


getSourceUnit

@Override
protected SourceUnit getSourceUnit()


isAnnotationCompatible

protected boolean isAnnotationCompatible()
Check if the current runtime allows Annotation usage.
Returns:
true if running on a 1.5+ runtime


visitAnnotations

protected void visitAnnotations(AnnotatedNode node, int target)


visitClass

public void visitClass(ClassNode node)


visitConstructor

public void visitConstructor(ConstructorNode node)


visitDeclarationExpression

@Override
public void visitDeclarationExpression(DeclarationExpression expression)


visitField

public void visitField(FieldNode node)


visitGenericType

public void visitGenericType(GenericsType genericsType)


visitMethod

public void visitMethod(MethodNode node)


visitProperty

public void visitProperty(PropertyNode node)


 

Copyright © 2003-2013 The Codehaus. All rights reserved.