KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > core > refactoring > IJavaElementMapper


1 /*******************************************************************************
2  * Copyright (c) 2005 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.core.refactoring;
12
13 import org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor;
14
15 import org.eclipse.jdt.core.IJavaElement;
16
17 /**
18  * An <code>IJavaElementMapper</code> provides methods to map an original
19  * elements to its refactored counterparts.
20  * <p>
21  * An <code>IJavaElementMapper</code> can be obtained via
22  * {@link RefactoringProcessor#getAdapter(Class)}.
23  * </p>
24  *
25  * @since 3.2
26  */

27 public interface IJavaElementMapper {
28     
29     /**
30      * Returns the refactored Java element for the given element.
31      * The returned Java element might not yet exist when the method
32      * is called.
33      * </p>
34      * Note that local variables <strong>cannot</strong> be mapped
35      * using this method.
36      * <p>
37      *
38      * @param element the element to be refactored
39      *
40      * @return the refactored element for the given element
41      */

42     IJavaElement getRefactoredJavaElement(IJavaElement element);
43 }
Popular Tags