PsiElement (PsiElement callExpression, IntroduceParameterObjectClassDescriptor descriptor, List<? extends ParameterInfo> oldMethodParameters, Object substitutor) { if (callExpression instanceof GrCallExpression) { final GrArgumentList list = ((GrCallExpression)callExpression).getArgumentList(); if (list == null) { return null; } final GrExpression[] args = list.getExpressionArguments(); final String qualifiedName = StringUtil.getQualifiedName(descriptor.getPackageName(), descriptor.getClassName()); String newExpression = "new " + qualifiedName + '(' + JavaIntroduceParameterObjectDelegate.getMergedArgs(descriptor, oldMethodParameters, args) + ')'; GroovyPsiElementFactory factory = GroovyPsiElementFactory.getInstance(callExpression.getProject()); return factory.createExpressionFromText(newExpression, callExpression); } return null; }