MethodDeclaration m= ASTNodeSearchUtil.getMethodDeclarationNode(getter, rewrite.getRoot()); DelegateCreator d= new DelegateMethodCreator(); d.setDeclareDeprecated(fDelegateDeprecation); d.setDeclaration(m); d.setNewElementName(newName); d.setSourceRewrite(rewrite); d.prepareDelegate(); d.createEdit();
MethodDeclaration declaration= ASTNodeSearchUtil.getMethodDeclarationNode(getter, rewrite.getRoot()); DelegateCreator creator= new DelegateMethodCreator(); creator.setDeclareDeprecated(fDelegateDeprecation); creator.setDeclaration(declaration); creator.setNewElementName(newName); creator.setSourceRewrite(rewrite); creator.prepareDelegate(); creator.createEdit(); Change change= creator.createChange(); if (change != null) fDelegateChanges.add(change);
	private void addMethodDelegate(IMethod getter, String newName, CompilationUnitRewrite rewrite) throws JavaModelException {		MethodDeclaration m= ASTNodeSearchUtil.getMethodDeclarationNode(getter, rewrite.getRoot());		DelegateCreator d= new DelegateMethodCreator();		d.setDeclareDeprecated(fDelegateDeprecation);		d.setDeclaration(m);		d.setNewElementName(newName);		d.setSourceRewrite(rewrite);		d.prepareDelegate();		d.createEdit();	}