blob: 9a9c86beee44526df6280e6a75bec7bc081031cd [file] [log] [blame]
/**
* Copyright (c) 2011-2016 EclipseSource Muenchen GmbH 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:
* EclipseSource Munich - initial API and implementation
*/
package org.eclipse.emf.emfstore.migration.edapt.test.model.d.model.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.emf.emfstore.migration.edapt.test.model.d.model.D;
import org.eclipse.emf.emfstore.migration.edapt.test.model.d.model.DFactory;
import org.eclipse.emf.emfstore.migration.edapt.test.model.d.model.DPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
*
* @generated
*/
public class DFactoryImpl extends EFactoryImpl implements DFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public static DFactory init() {
try {
final DFactory theDFactory = (DFactory) EPackage.Registry.INSTANCE.getEFactory(DPackage.eNS_URI);
if (theDFactory != null) {
return theDFactory;
}
} catch (final Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new DFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public DFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case DPackage.D:
return createD();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public D createD() {
final DImpl d = new DImpl();
return d;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public DPackage getDPackage() {
return (DPackage) getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @deprecated
* @generated
*/
@Deprecated
public static DPackage getPackage() {
return DPackage.eINSTANCE;
}
} // DFactoryImpl