01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.contexts;
11:
12: import org.eclipse.core.commands.contexts.ContextManager;
13:
14: /**
15: * This class allows clients to broker instances of <code>IContextManager</code>.
16: * <p>
17: * This class is not intended to be extended by clients.
18: * </p>
19: *
20: * @since 3.0
21: */
22: public final class ContextManagerFactory {
23:
24: /**
25: * Creates a new instance of <code>ContextManagerWrapper</code>.
26: *
27: * @param contextManager
28: * The context manager that this context manager wrapper should
29: * wrap; must not be <code>null</code>.
30: * @return a new instance of <code>ContextManagerWrapper</code>. Clients
31: * should not make assumptions about the concrete implementation
32: * outside the contract of the interface. Guaranteed not to be
33: * <code>null</code>.
34: */
35: public static final ContextManagerLegacyWrapper getContextManagerWrapper(
36: final ContextManager contextManager) {
37: return new ContextManagerLegacyWrapper(contextManager);
38: }
39:
40: /**
41: * This class should not be constructed.
42: */
43: private ContextManagerFactory() {
44: // Should not be called.
45: }
46: }
|