boolean (@NotNull PsiAnnotation psiAnnotation, @NotNull PsiClass psiClass, @NotNull ProblemSink builder) { if (checkWrongType(psiClass)) { builder.addErrorMessage("inspection.message.standardexception.class.only.supported.on.class"); return false; } if (checkWrongInheritorOfThrowable(psiClass)) { builder.addErrorMessage("inspection.message.standardexception.should.extend.throwable"); return false; } if (checkWrongAccessVisibility(psiAnnotation)) { builder.addErrorMessage("inspection.message.standardexception.accesslevel.none.not.valid"); //log error but continue } return true; }