1 /*******************************************************************************
2 * Copyright (c) 2005, 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
12 package org.eclipse.jdt.internal.corext.refactoring.structure;
14 import org.eclipse.core.runtime.CoreException;
16 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
18 import org.eclipse.jdt.core.dom.MethodDeclaration;
21 public abstract class BodyUpdater {
24 * Updates the body of a method declaration. This method is called by the
25 * {@link ChangeSignatureProcessor} and allows implementors to refactor the body
26 * of the given method declaration.
28 * @param methodDeclaration
31 * @throws CoreException
33 public abstract void updateBody(MethodDeclaration methodDeclaration, CompilationUnitRewrite cuRewrite, RefactoringStatus result) throws CoreException;
36 * Returns whether {@link ChangeSignatureProcessor} should check if
37 * deleted parameters are currently used in the method body.
39 * @return <code>true</code> by default, subclasses can override
41 public boolean needsParameterUsedCheck() {