PsiType (@Nullable PsiType psiType, @NotNull PsiClass superClass, int typeParamIndex, boolean eraseTypeParameter) { PsiClassType.ClassResolveResult classResolveResult = resolveClass(psiType); PsiClass psiClass = classResolveResult.getElement(); if (psiClass == null) return null; return substituteType(typeParamIndex, eraseTypeParameter, classResolveResult, psiClass, superClass); }