parameters.add(parameter);
intermediary.parameters().add(parameter);
	private void createIntermediaryMethod() throws CoreException {		CompilationUnitRewrite imRewrite= getCachedCURewrite(fIntermediaryClass.getCompilationUnit());		AST ast= imRewrite.getAST();		MethodDeclaration intermediary= ast.newMethodDeclaration();		// Name		intermediary.setName(ast.newSimpleName(fIntermediaryMethodName));		// Flags		List modifiers= intermediary.modifiers();		modifiers.add(imRewrite.getAST().newModifier(ModifierKeyword.PUBLIC_KEYWORD));		modifiers.add(imRewrite.getAST().newModifier(ModifierKeyword.STATIC_KEYWORD));		// Parameters		String targetParameterName= findNonClashingArgumentName(fTargetMethod.getParameterNames());			//StubUtility.suggestArgumentName(getProject(), fIntermediaryFirstParameterType.getName(), fTargetMethod.getParameterNames());		List parameters= intermediary.parameters();		if (!isStaticTarget()) {			// Add first param			SingleVariableDeclaration parameter= imRewrite.getAST().newSingleVariableDeclaration();			Type t= imRewrite.getImportRewrite().addImport(fIntermediaryFirstParameterType, imRewrite.getAST());			if (fIntermediaryFirstParameterType.isGenericType()) {				ParameterizedType parameterized= imRewrite.getAST().newParameterizedType(t);				ITypeBinding[] typeParameters= fIntermediaryFirstParameterType.getTypeParameters();				for (int i= 0; i < typeParameters.length; i++)					parameterized.typeArguments().add(imRewrite.getImportRewrite().addImport(typeParameters[i], imRewrite.getAST()));				t= parameterized;			}			parameter.setType(t);			parameter.setName(imRewrite.getAST().newSimpleName(targetParameterName));			parameters.add(parameter);		}		// Add other params		copyArguments(parameters, imRewrite);		// Add type parameters of declaring class (and enclosing classes)		if (!isStaticTarget() && fIntermediaryFirstParameterType.isGenericType())			addTypeParameters(imRewrite, intermediary.typeParameters(), fIntermediaryFirstParameterType);		// Add type params of method		copyTypeParameters(intermediary.typeParameters(), imRewrite);		// Return type		intermediary.setReturnType2(imRewrite.getImportRewrite().addImport(fTargetMethodBinding.getReturnType(), ast));		// Exceptions		copyExceptions(intermediary.thrownExceptions(), imRewrite);		// Body		MethodInvocation invocation= imRewrite.getAST().newMethodInvocation();		invocation.setName(imRewrite.getAST().newSimpleName(fTargetMethod.getElementName()));		if (isStaticTarget()) {			Type type= imRewrite.getImportRewrite().addImport(fTargetMethodBinding.getDeclaringClass(), ast);			invocation.setExpression(ASTNodeFactory.newName(ast, ASTNodes.asString(type)));		} else {			invocation.setExpression(imRewrite.getAST().newSimpleName(targetParameterName));		}		copyInvocationParameters(invocation.arguments(), ast);		Statement call= encapsulateInvocation(intermediary, invocation);		final Block body= imRewrite.getAST().newBlock();		body.statements().add(call);		intermediary.setBody(body);		// method comment		String comment= CodeGeneration.getMethodComment(imRewrite.getCu(), fIntermediaryClass.getFullyQualifiedName('.'), intermediary, fTargetMethodBinding, StubUtility				.getLineDelimiterUsed(imRewrite.getCu()));		if (comment != null) {			Javadoc javadoc= (Javadoc) imRewrite.getASTRewrite().createStringPlaceholder(comment, ASTNode.JAVADOC);			intermediary.setJavadoc(javadoc);		}		// Add the completed method to the intermediary type:		// Intermediary class is non-anonymous		AbstractTypeDeclaration type= (AbstractTypeDeclaration) typeToDeclaration(fIntermediaryClass, imRewrite.getRoot());		ChildListPropertyDescriptor typeBodyDeclarationsProperty= typeToBodyDeclarationProperty(fIntermediaryClass, imRewrite.getRoot());		ListRewrite bodyDeclarationsListRewrite= imRewrite.getASTRewrite().getListRewrite(type, typeBodyDeclarationsProperty);		bodyDeclarationsListRewrite.insertAt(intermediary, ASTNodes.getInsertionIndex(intermediary, type.bodyDeclarations()), imRewrite				.createGroupDescription(RefactoringCoreMessages.IntroduceIndirectionRefactoring_group_description_create_new_method));	}