KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > runtime > ContributorFactorySimple


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.core.runtime;
12
13 import org.eclipse.core.runtime.spi.RegistryContributor;
14
15 /**
16  * The contributor factory creates new registry contributors for use in a simple
17  * registry based on the String representation of the determining object.
18  * <p>
19  * This class can be used without OSGi running.
20  * </p><p>
21  * This class can not be extended or instantiated by clients.
22  * </p><p>
23  * <b>Note:</b> This class/interface is part of an interim API that is still under
24  * development and expected to change significantly before reaching stability.
25  * It is being made available at this early stage to solicit feedback from pioneering
26  * adopters on the understanding that any code that uses this API will almost certainly
27  * be broken (repeatedly) as the API evolves.
28  * </p>
29  * @since org.eclipse.equinox.registry 3.2
30  */

31 public final class ContributorFactorySimple {
32     
33     /**
34      * Creates registry contributor object based on a determining object.The determining
35      * object must not be <code>null</code>.
36      *
37      * @param determiningObject object associated with the contribution
38      * @return new registry contributor based on the determining object
39      */

40     public static IContributor createContributor(Object JavaDoc determiningObject) {
41         String JavaDoc id = determiningObject.toString();
42         return new RegistryContributor(id, id, null, null);
43     }
44 }
45
Popular Tags