Package org.codehaus.groovy.classgen
Class AnnotationVisitor
java.lang.Object
org.codehaus.groovy.classgen.AnnotationVisitor
An Annotation visitor responsible with:
- reading annotation metadata (@Retention, @Target, attribute types)
- verify that an
AnnotationNode conforms to annotation meta
- enhancing an AnnotationNode AST to reflect real annotation meta- Author:
- Alex Popescu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidvoidcheckCircularReference(ClassNode searchClass, ClassNode attrType, Expression startExp) voidcheckReturnType(ClassNode attrType, ASTNode node) voidvisit(AnnotationNode node) protected voidvisitAnnotationExpression(String attrName, AnnotationConstantExpression expression, ClassNode attrType) protected voidvisitConstantExpression(String attrName, ConstantExpression constExpr, ClassNode attrType) protected voidvisitEnumExpression(String attrName, PropertyExpression propExpr, ClassNode attrType) protected voidvisitExpression(String attrName, Expression attrExp, ClassNode attrType) protected voidvisitListExpression(String attrName, ListExpression listExpr, ClassNode elementType)
-
Constructor Details
-
AnnotationVisitor
-
-
Method Details
-
setReportClass
-
visit
-
visitExpression
-
checkReturnType
-
visitAnnotationExpression
protected void visitAnnotationExpression(String attrName, AnnotationConstantExpression expression, ClassNode attrType) - Parameters:
attrName- the nameexpression- the expressionattrType- the type
-
visitListExpression
-
visitConstantExpression
protected void visitConstantExpression(String attrName, ConstantExpression constExpr, ClassNode attrType) -
visitEnumExpression
protected void visitEnumExpression(String attrName, PropertyExpression propExpr, ClassNode attrType) -
addError
-
addError
-
checkCircularReference
-