/** * 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.dbprice.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.dbprice.*; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class DBPriceFactoryImpl extends EFactoryImpl implements DBPriceFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static DBPriceFactory init() { try { DBPriceFactory theDBPriceFactory = (DBPriceFactory)EPackage.Registry.INSTANCE.getEFactory("http:///org.eclipse.emf.test.models/dbprice"); if (theDBPriceFactory != null) { return theDBPriceFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new DBPriceFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DBPriceFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case DBPricePackage.PENCIL_TYPE: return createPencilType(); case DBPricePackage.PEN_TYPE: return createPenType(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public PencilType createPencilType() { PencilTypeImpl pencilType = new PencilTypeImpl(); return pencilType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public PenType createPenType() { PenTypeImpl penType = new PenTypeImpl(); return penType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DBPricePackage getDBPricePackage() { return (DBPricePackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static DBPricePackage getPackage() { return DBPricePackage.eINSTANCE; } } //DBPriceFactoryImpl