/* * Copyright (c) 2008-2013, 2015, 2016 Eike Stepper (Berlin, Germany) 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: * Eike Stepper - initial API and implementation */ package org.eclipse.emf.cdo.tests.model3.subpackage.impl; //import org.eclipse.emf.cdo.tests.model3.subpackage.*; import org.eclipse.emf.cdo.tests.model3.subpackage.Class2; import org.eclipse.emf.cdo.tests.model3.subpackage.SubpackageFactory; import org.eclipse.emf.cdo.tests.model3.subpackage.SubpackagePackage; 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; /** * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc --> * @generated */ public class SubpackageFactoryImpl extends EFactoryImpl implements SubpackageFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public static SubpackageFactory init() { try { SubpackageFactory theSubpackageFactory = (SubpackageFactory)EPackage.Registry.INSTANCE.getEFactory(SubpackagePackage.eNS_URI); if (theSubpackageFactory != null) { return theSubpackageFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new SubpackageFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public SubpackageFactoryImpl() { super(); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case SubpackagePackage.CLASS2: return createClass2(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public Class2 createClass2() { Class2Impl class2 = new Class2Impl(); return class2; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public SubpackagePackage getSubpackagePackage() { return (SubpackagePackage)getEPackage(); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static SubpackagePackage getPackage() { return SubpackagePackage.eINSTANCE; } } // SubpackageFactoryImpl