PsiSubstitutor () { PsiSubstitutor incompleteSubstitutor = super.getSubstitutor(); if (myTypeArguments != null) { PsiMethod method = getElement(); PsiTypeParameter[] typeParams = method.getTypeParameters(); for (int i = 0; i < myTypeArguments.length && i < typeParams.length; i++) { incompleteSubstitutor = incompleteSubstitutor.put(typeParams[i], myTypeArguments[i]); } } return incompleteSubstitutor; }