Skip to main content
summaryrefslogtreecommitdiffstats
blob: 8d5df864698745757f97a983d0c3f2437158f030 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*******************************************************************************
 * Copyright (c) 2003, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jem.internal.instantiation.base;
/*
 *  $RCSfile: JavaInstantiationHandlerFactoryAdapter.java,v $
 *  $Revision: 1.6 $  $Date: 2005/09/14 23:30:35 $ 
 */

import org.eclipse.emf.common.notify.impl.AdapterImpl;

import org.eclipse.jem.java.internal.impl.JavaFactoryImpl;
import org.eclipse.jem.internal.java.instantiation.IInstantiationHandler;
import org.eclipse.jem.internal.java.instantiation.IInstantiationHandlerFactoryAdapter;

/**
 * This adapter is attached to the resource set for a java model. The
 * JavaXMIFactory will ask for this adapter and ask it for the IInstantiationHandler.
 */
public class JavaInstantiationHandlerFactoryAdapter extends AdapterImpl implements IInstantiationHandlerFactoryAdapter {

	/**
	 * Constructor for JavaInstantiationHandlerFactoryAdapter.
	 */
	public JavaInstantiationHandlerFactoryAdapter() {
		super();
	}

	/**
	 * @see org.eclipse.jem.internal.instantiation.IInstantiationHandlerFactoryAdapter#getInstantiationHandler(JavaFactoryImpl)
	 */
	public IInstantiationHandler getInstantiationHandler(JavaFactoryImpl factory) {
		return JavaFactoryHandler.INSTANCE;
	}

	/**
	 * @see org.eclipse.emf.common.notify.Adapter#isAdapterForType(Object)
	 */
	public boolean isAdapterForType(Object type) {
		return IInstantiationHandlerFactoryAdapter.ADAPTER_KEY == type;
	}

}

Back to the top