PsiSubstitutor (@NotNull Map<PsiTypeParameter, PsiType> initialMap, @NotNull PsiSubstitutor initialSubstitutor, @NotNull PsiMethod actual) { if (actual.hasTypeParameters()) { final HashMap<PsiTypeParameter, PsiType> map1 = new HashMap<>(initialMap); for (PsiTypeParameter parameter : actual.getTypeParameters()) { map1.put(parameter, null); } return PsiSubstitutor.createSubstitutor(map1); } else { return initialSubstitutor; } }