void (@NotNull PsiClass psiClass, @NotNull ProblemSink builder) { final boolean definedOnWrongType = psiClass.isAnnotationType() || psiClass.isInterface() || psiClass.isEnum(); if (definedOnWrongType) { builder.addErrorMessage("inspection.message.equals.and.hashcode.only.supported.on.class.type"); builder.markFailed(); } }