boolean (@NotNull PsiClass psiClass, @NotNull ProblemSink builder) { boolean result = true; if (psiClass.isAnnotationType() || psiClass.isInterface()) { builder.addErrorMessage("inspection.message.field.name.constants.only.supported.on.class.enum.or.field.type"); result = false; } return result; }