/** * <copyright> Copyright (c) 2008-2009 Jonas Helming, Maximilian Koegel. 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 </copyright> */ package org.eclipse.emf.emfstore.client.test.model.util.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.client.test.model.util.ModelElementPath; import org.eclipse.emf.emfstore.client.test.model.util.UtilFactory; import org.eclipse.emf.emfstore.client.test.model.util.UtilPackage; /** * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc --> * * @generated */ public class UtilFactoryImpl extends EFactoryImpl implements UtilFactory { /** * Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ public static UtilFactory init() { try { UtilFactory theUtilFactory = (UtilFactory) EPackage.Registry.INSTANCE .getEFactory("http://eclipse.org/emf/emfstore/client/test/model/util"); if (theUtilFactory != null) { return theUtilFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new UtilFactoryImpl(); } /** * Creates an instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ public UtilFactoryImpl() { super(); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case UtilPackage.MODEL_ELEMENT_PATH: return createModelElementPath(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ public ModelElementPath createModelElementPath() { ModelElementPathImpl modelElementPath = new ModelElementPathImpl(); return modelElementPath; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ public UtilPackage getUtilPackage() { return (UtilPackage) getEPackage(); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @deprecated * @generated */ @Deprecated public static UtilPackage getPackage() { return UtilPackage.eINSTANCE; } } // UtilFactoryImpl