KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ltk > internal > core > refactoring > history > DefaultRefactoringDescriptor


1 /*******************************************************************************
2  * Copyright (c) 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.internal.core.refactoring.history;
12
13 import java.util.Collections JavaDoc;
14 import java.util.HashMap JavaDoc;
15 import java.util.Map JavaDoc;
16
17 import org.eclipse.core.runtime.Assert;
18 import org.eclipse.core.runtime.CoreException;
19
20 import org.eclipse.ltk.core.refactoring.Refactoring;
21 import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
22 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
23
24 /**
25  * Default implementation of a refactoring descriptor.
26  *
27  * @since 3.2
28  */

29 public final class DefaultRefactoringDescriptor extends RefactoringDescriptor {
30
31     /** The map of arguments (element type: <String, String>) */
32     private final Map JavaDoc fArguments;
33
34     /**
35      * Creates a new default refactoring descriptor.
36      *
37      * @param id
38      * the unique id of the refactoring
39      * @param project
40      * the project name, or <code>null</code>
41      * @param description
42      * the description
43      * @param comment
44      * the comment, or <code>null</code>
45      * @param arguments
46      * the argument map
47      * @param flags
48      * the flags
49      */

50     public DefaultRefactoringDescriptor(final String JavaDoc id, final String JavaDoc project, final String JavaDoc description, final String JavaDoc comment, final Map JavaDoc arguments, final int flags) {
51         super(id, project, description, comment, flags);
52         Assert.isNotNull(arguments);
53         fArguments= Collections.unmodifiableMap(new HashMap JavaDoc(arguments));
54     }
55
56     /**
57      * {@inheritDoc}
58      */

59     public Refactoring createRefactoring(final RefactoringStatus status) throws CoreException {
60         return null;
61     }
62
63     /**
64      * Returns the argument map
65      *
66      * @return the argument map.
67      */

68     public Map JavaDoc getArguments() {
69         return fArguments;
70     }
71 }
Popular Tags