KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ltk > core > refactoring > participants > SharableParticipants


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.ltk.core.refactoring.participants;
12
13 import java.util.HashMap JavaDoc;
14 import java.util.Map JavaDoc;
15
16 import org.eclipse.ltk.internal.core.refactoring.ParticipantDescriptor;
17
18 /**
19  * An opaque list to manage sharable participants.
20  * <p>
21  * The list is managed by the refactoring itself. Clients typically
22  * only pass the list to the corresponding method defined in
23  * {@link org.eclipse.ltk.core.refactoring.participants.ParticipantManager}
24  * </p>
25  * <p>
26  * Note: this class is not intended to be extended or instantiated by clients.
27  * </p>
28  *
29  * @see ISharableParticipant
30  * @see org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring
31  * @see org.eclipse.ltk.core.refactoring.participants.ParticipantManager
32  *
33  * @since 3.0
34  */

35 public class SharableParticipants {
36     
37     private Map JavaDoc fMap= new HashMap JavaDoc();
38     
39     /* package */ void put(ParticipantDescriptor descriptor, RefactoringParticipant participant) {
40         fMap.put(descriptor, participant);
41     }
42     /* package */ RefactoringParticipant get(ParticipantDescriptor descriptor) {
43         return (RefactoringParticipant)fMap.get(descriptor);
44     }
45 }
46
Popular Tags