Copyright (c) 2006, 2008 IBM Corporation and others. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-2.0/ SPDX-License-Identifier: EPL-2.0 Contributors: IBM Corporation - initial API and implementation
/******************************************************************************* * Copyright (c) 2006, 2008 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/
package org.eclipse.jdt.core.refactoring.descriptors; import java.util.Map; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.CoreException; import org.eclipse.ltk.core.refactoring.Refactoring; import org.eclipse.ltk.core.refactoring.RefactoringContribution; import org.eclipse.ltk.core.refactoring.RefactoringDescriptor; import org.eclipse.ltk.core.refactoring.RefactoringStatus;
Partial implementation of a Java refactoring contribution.

Note: this class is not intended to be extended outside the refactoring framework.

Since:1.1
@noextendThis class is not intended to be subclassed by clients outside JDT
/** * Partial implementation of a Java refactoring contribution. * <p> * Note: this class is not intended to be extended outside the refactoring * framework. * </p> * * @since 1.1 * * @noextend This class is not intended to be subclassed by clients outside JDT */
public abstract class JavaRefactoringContribution extends RefactoringContribution { @Override public final Map<String, String> retrieveArgumentMap(final RefactoringDescriptor descriptor) { Assert.isNotNull(descriptor); if (descriptor instanceof JavaRefactoringDescriptor) return ((JavaRefactoringDescriptor) descriptor).getArguments(); return super.retrieveArgumentMap(descriptor); }
Creates the a new refactoring instance.
Params:
  • descriptor – the refactoring descriptor
  • status – the status used for the resulting status
Throws:
  • CoreException – if an error occurs while creating the refactoring
Returns: the refactoring, or null
Since:1.2
/** * Creates the a new refactoring instance. * * @param descriptor * the refactoring descriptor * @param status * the status used for the resulting status * @return * the refactoring, or <code>null</code> * @throws CoreException * if an error occurs while creating the refactoring * @since 1.2 */
public abstract Refactoring createRefactoring(JavaRefactoringDescriptor descriptor, RefactoringStatus status) throws CoreException; }