boolean (PsiType type) { type = uncapture(type); if (type instanceof PsiClassType) { final PsiClass psiClass = ((PsiClassType)type).resolve(); if (psiClass instanceof PsiTypeParameter) { return InheritanceUtil.isInheritor(psiClass, true, JAVA_LANG_ENUM); } return psiClass != null && psiClass.isEnum(); } return false; }