KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > corext > refactoring > structure > BodyUpdater


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 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
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.jdt.internal.corext.refactoring.structure;
13
14 import org.eclipse.core.runtime.CoreException;
15
16 import org.eclipse.jdt.core.dom.MethodDeclaration;
17
18 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
19
20
21 public abstract class BodyUpdater {
22
23     /**
24      * Updates the body of a method declaration. This method is called by the
25      * {@link ChangeSignatureRefactoring} and allows implementors to refactor the body
26      * of the given method declaration.
27      *
28      * @param methodDeclaration
29      * @param cuRewrite
30      * @param result
31      * @throws CoreException
32      */

33     public abstract void updateBody(MethodDeclaration methodDeclaration, CompilationUnitRewrite cuRewrite, RefactoringStatus result) 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 }
46
Popular Tags