boolean (PsiMethod method, PsiClass containingClass) { if (containingClass instanceof GrEnumTypeDefinitionImpl && ((GrEnumTypeDefinitionImpl)containingClass).isPredefinedEnumMethod(method)) { return false; } for (PsiMethod psiMethod : method.findSuperMethods()) { if (!psiMethod.hasModifierProperty(PsiModifier.ABSTRACT)) { final PsiType type = method.getReturnType(); final PsiType superType = psiMethod.getReturnType(); if (type != null && superType != null && !superType.isAssignableFrom(type)) { return false; } } } return true; }