/** * Copyright (c) 2004 - 2010 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.legacy.model3.impl; import org.eclipse.emf.cdo.tests.legacy.model3.Model3Factory; import org.eclipse.emf.cdo.tests.legacy.model3.Model3Package; import org.eclipse.emf.cdo.tests.model3.Class1; import org.eclipse.emf.cdo.tests.model3.MetaRef; 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; /** * An implementation of the model Factory. * * @generated */ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory { /** * Creates the default factory implementation. * * @generated NOT */ public static Model3Factory init() { try { Model3Factory theModel3Factory = (Model3Factory)EPackage.Registry.INSTANCE .getEFactory("http://www.eclipse.org/emf/CDO/tests/legacy/model3/1.0.0"); if (theModel3Factory != null) { return theModel3Factory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new Model3FactoryImpl(); } /** * Creates an instance of the factory. * * @generated */ public Model3FactoryImpl() { super(); } /** * * * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case Model3Package.CLASS1: return createClass1(); case Model3Package.META_REF: return createMetaRef(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * * * @generated */ public Class1 createClass1() { Class1Impl class1 = new Class1Impl(); return class1; } /** * * * @generated */ public MetaRef createMetaRef() { MetaRefImpl metaRef = new MetaRefImpl(); return metaRef; } /** * * * @generated */ public Model3Package getModel3Package() { return (Model3Package)getEPackage(); } /** * * * @deprecated * @generated */ @Deprecated public static Model3Package getPackage() { return Model3Package.eINSTANCE; } } // Model3FactoryImpl