boolean (@NotNull PsiClass psiClass, @NotNull PsiAnnotation psiAnnotation, @NotNull ProblemSink builder) { if (psiClass.isAnnotationType() || psiClass.isInterface() || psiClass.isEnum()) { builder.addErrorMessage("inspection.message.s.can.be.used.on.classes.only", psiAnnotation.getQualifiedName()); return false; } return true; }