List<ParameterInfoImpl> (Map<PsiVariable, PsiType> changedParams, final PsiMethod psiMethod) { final ArrayList<ParameterInfoImpl> newParameters = new ArrayList<>(); final PsiParameter[] oldParameters = psiMethod.getParameterList().getParameters(); for (int i = 0; i < oldParameters.length; i++) { final PsiParameter oldParameter = oldParameters[i]; PsiType type = oldParameter.getType(); for (PsiVariable variable : changedParams.keySet()) { if (PsiEquivalenceUtil.areElementsEquivalent(variable, oldParameter)) { type = changedParams.get(variable); break; } } newParameters.add(ParameterInfoImpl.create(i).withName(oldParameter.getName()).withType(type)); } return newParameters; }