private void validateClassAnnotation(IClassDefinition definition, IMetaTag tag) { IAnnotationDefinition annotation = manager.getAnnotation(tag); if (annotation == null) { // XXX (Annotation) AnnotationNotDefinedProblem manager.addProblem(new AnnotationProblem(definition)); return; } if (!annotation.isValidTarget(definition)) { // XXX (Annotation) InvlaidTargetForAnnotationProblem manager.addProblem(new AnnotationProblem(definition)); } }
private void validateMemberAnnotation(IDefinition definition, IMetaTag tag) { IAnnotationDefinition annotation = manager.getAnnotation(tag); if (annotation == null) { // XXX (Annotation) AnnotationNotDefinedProblem manager.addProblem(new AnnotationProblem(definition)); return; } if (!annotation.isValidTarget(definition)) { // XXX (Annotation) InvlaidTargetForAnnotationProblem manager.addProblem( new InvlaidTargetForAnnotationProblem(tag, "method", annotation.getQualifiedName())); } }