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.ltk.core.refactoring; 12 13 import org.eclipse.core.resources.IResource; 14 15 import org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor; 16 17 /** 18 * An <code>IResourceMapper</code> provides methods to map an original 19 * resource to its refactored counterparts. 20 * <p> 21 * An <code>IResourceMapper</code> can be obtained via 22 * {@link RefactoringProcessor#getAdapter(Class)}. 23 * </p> 24 * <p> 25 * This interface is intended to be implemented by clients. 26 * </p> 27 * 28 * @since 3.2 29 */ 30 public interface IResourceMapper { 31 32 /** 33 * Returns the refactored resource for the given element. 34 * <p> 35 * Note that the returned resource might not yet exist 36 * when the method is called. 37 * </p> 38 * 39 * @param element the resource to be refactored 40 * 41 * @return the refactored element for the given element 42 */ 43 IResource getRefactoredResource(IResource element); 44 } 45