/** Check an annotation of a symbol. */ public void validateAnnotation(JCAnnotation a, Symbol s) { validateAnnotation(a); if (!annotationApplicable(a, s)) log.error(a.pos(), "annotation.type.not.applicable"); if (a.annotationType.type.tsym == syms.overrideType.tsym) { if (!isOverrider(s)) log.error(a.pos(), "method.does.not.override.superclass"); } }
/** Check an annotation of a symbol. */ public void validateAnnotation(JCAnnotation a, Symbol s) { validateAnnotation(a); if (!annotationApplicable(a, s)) log.error(a.pos(), "annotation.type.not.applicable"); if (a.annotationType.type.tsym == syms.overrideType.tsym) { if (!isOverrider(s)) log.error(a.pos(), "method.does.not.override.superclass"); } }
/** Check an annotation of a symbol. */ private void validateAnnotation(JCAnnotation a, Symbol s) { validateAnnotationTree(a); if (!annotationApplicable(a, s)) log.error(a.pos(), "annotation.type.not.applicable"); if (a.annotationType.type.tsym == syms.functionalInterfaceType.tsym) { if (s.kind != TYP) { log.error(a.pos(), "bad.functional.intf.anno"); } else if (!s.isInterface() || (s.flags() & ANNOTATION) != 0) { log.error(a.pos(), "bad.functional.intf.anno.1", diags.fragment("not.a.functional.intf", s)); } } }
/** Check an annotation of a symbol. */ private void validateAnnotation(JCAnnotation a, Symbol s) { validateAnnotationTree(a); if (!annotationApplicable(a, s)) log.error(a.pos(), "annotation.type.not.applicable"); if (a.annotationType.type.tsym == syms.functionalInterfaceType.tsym) { if (s.kind != TYP) { log.error(a.pos(), "bad.functional.intf.anno"); } else if (!s.isInterface() || (s.flags() & ANNOTATION) != 0) { log.error(a.pos(), "bad.functional.intf.anno.1", diags.fragment("not.a.functional.intf", s)); } } }
JCAnnotation annoTree = m.Annotation(c); if (!chk.annotationApplicable(annoTree, on)) log.error(annoTree.pos(), "invalid.repeatable.annotation.incompatible.target", targetContainerType, origAnnoType);
JCAnnotation annoTree = m.Annotation(c); if (!chk.annotationApplicable(annoTree, on)) log.error(annoTree.pos(), "invalid.repeatable.annotation.incompatible.target", targetContainerType, origAnnoType);