boolean (@NotNull PsiType type, @NotNull PsiTypeParameter typeParameter, @NotNull PsiSubstitutor superClassSubstitutor) { PsiType substituted = superClassSubstitutor.substitute(type); if (!(substituted instanceof PsiClassType)) return false; PsiClassType.ClassResolveResult result = ((PsiClassType)substituted).resolveGenerics(); return typeParameter.equals(result.getElement()) && result.getSubstitutor().equals(PsiSubstitutor.EMPTY); }