public class AnnotationVisitor extends Object
AnnotationNode
conforms to annotation metaAnnotationNode
AST to reflect real annotation metaConstructor and Description |
---|
AnnotationVisitor(SourceUnit source,
ErrorCollector errorCollector) |
Modifier and Type | Method and Description |
---|---|
protected void |
addError(String msg) |
protected void |
addError(String msg,
ASTNode expr) |
void |
checkCircularReference(ClassNode searchClass,
ClassNode attrType,
Expression startExp) |
void |
checkReturnType(ClassNode attrType,
ASTNode node) |
void |
setReportClass(ClassNode cn) |
AnnotationNode |
visit(AnnotationNode node) |
protected void |
visitAnnotationExpression(String attrName,
AnnotationConstantExpression expression,
ClassNode attrType) |
protected void |
visitConstantExpression(String attrName,
ConstantExpression constExpr,
ClassNode attrType) |
protected void |
visitEnumExpression(String attrName,
PropertyExpression propExpr,
ClassNode attrType) |
protected void |
visitExpression(String attrName,
Expression attrExp,
ClassNode attrType) |
protected void |
visitListExpression(String attrName,
ListExpression listExpr,
ClassNode elementType) |
public AnnotationVisitor(SourceUnit source, ErrorCollector errorCollector)
public void setReportClass(ClassNode cn)
public AnnotationNode visit(AnnotationNode node)
protected void visitExpression(String attrName, Expression attrExp, ClassNode attrType)
protected void visitAnnotationExpression(String attrName, AnnotationConstantExpression expression, ClassNode attrType)
attrName
- the nameexpression
- the expressionattrType
- the typeprotected void visitListExpression(String attrName, ListExpression listExpr, ClassNode elementType)
protected void visitConstantExpression(String attrName, ConstantExpression constExpr, ClassNode attrType)
protected void visitEnumExpression(String attrName, PropertyExpression propExpr, ClassNode attrType)
protected void addError(String msg)
public void checkCircularReference(ClassNode searchClass, ClassNode attrType, Expression startExp)