void (@NotNull PsiClass psiClass, @NotNull ProblemSink builder) { if (psiClass.isAnnotationType() || psiClass.isInterface()) { builder.addErrorMessage("inspection.message.to.string.only.supported.on.class.or.enum.type"); builder.markFailed(); } }