01: /*******************************************************************************
02: * Copyright (c) 2005, 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.internal.corext.refactoring.structure;
11:
12: import org.eclipse.core.runtime.CoreException;
13:
14: import org.eclipse.jdt.core.dom.MethodDeclaration;
15:
16: import org.eclipse.ltk.core.refactoring.RefactoringStatus;
17:
18: public abstract class BodyUpdater {
19:
20: /**
21: * Updates the body of a method declaration. This method is called by the
22: * {@link ChangeSignatureRefactoring} and allows implementors to refactor the body
23: * of the given method declaration.
24: *
25: * @param methodDeclaration
26: * @param cuRewrite
27: * @param result
28: * @throws CoreException
29: */
30: public abstract void updateBody(
31: MethodDeclaration methodDeclaration,
32: CompilationUnitRewrite cuRewrite, RefactoringStatus result)
33: throws CoreException;
34:
35: /**
36: * Returns whether {@link ChangeSignatureRefactoring} should check if
37: * deleted parameters are currently used in the method body.
38: *
39: * @return <code>true</code> by default, subclasses can override
40: */
41: public boolean needsParameterUsedCheck() {
42: return true;
43: }
44:
45: }
|