KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > corext > refactoring > tagging > INameUpdating


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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 package org.eclipse.jdt.internal.corext.refactoring.tagging;
12
13 import org.eclipse.core.runtime.CoreException;
14
15 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
16
17 /**
18  * Represents processors in the JDT space that rename elements.
19  */

20 public interface INameUpdating {
21     
22     /**
23      * Sets new name for the entity that this refactoring is working on.
24      */

25     public void setNewElementName(String JavaDoc newName);
26     
27     /**
28      * Get the name for the entity that this refactoring is working on.
29      */

30     public String JavaDoc getNewElementName();
31
32     /**
33      * Gets the current name of the entity that this refactoring is working on.
34      */

35     public String JavaDoc getCurrentElementName();
36     
37     /**
38      * Gets the original elements. Since an <code>INameUpdating</code> only renames one element,
39      * this method must return an array containing exactly one element.
40      * @return an array containing exactly one element
41      * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getElements()
42      */

43     public Object JavaDoc[] getElements();
44     
45     /**
46      * Gets the element after renaming, or <code>null</code> if not available.
47      */

48     public Object JavaDoc getNewElement() throws CoreException;
49
50     /**
51      * Checks if the new name is valid for the entity that this refactoring renames.
52      */

53     public RefactoringStatus checkNewElementName(String JavaDoc newName) throws CoreException;
54 }
55
Popular Tags