/** * Copyright (c) 2007 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 - Initial API and implementation */ package org.eclipse.emf.test.models.ext.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.test.models.ext.ExtE; import org.eclipse.emf.test.models.ext.ExtFactory; import org.eclipse.emf.test.models.ext.ExtPackage; import org.eclipse.emf.test.models.ext.F; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class ExtFactoryImpl extends EFactoryImpl implements ExtFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ExtFactory init() { try { ExtFactory theExtFactory = (ExtFactory)EPackage.Registry.INSTANCE.getEFactory(ExtPackage.eNS_URI); if (theExtFactory != null) { return theExtFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new ExtFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ExtFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case ExtPackage.EXT_E: return createExtE(); case ExtPackage.F: return createF(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ExtE createExtE() { ExtEImpl extE = new ExtEImpl(); return extE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public F createF() { FImpl f = new FImpl(); return f; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ExtPackage getExtPackage() { return (ExtPackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static ExtPackage getPackage() { return ExtPackage.eINSTANCE; } } //ExtFactoryImpl