PsiSubstitutor (@NotNull MethodCandidateInfo info) { PsiSubstitutor siteSubstitutor = info.getSiteSubstitutor(); if (!myLanguageLevel.isAtLeast(LanguageLevel.JDK_1_8)) { return siteSubstitutor; } PsiSubstitutor substitutor = PsiSubstitutor.EMPTY; PsiClass containingClass = info.getElement().getContainingClass(); if (containingClass != null) { for (PsiTypeParameter param : PsiUtil.typeParametersIterable(containingClass)) { substitutor = substitutor.put(param, siteSubstitutor.substitute(param)); } } return substitutor; }