/** * Copyright (c) 2013 itemis AG 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: * itemis AG - initial API and implementation * */ package org.eclipse.rmf.tests.serialization.model.extnodes.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.rmf.tests.serialization.model.extnodes.*; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class ExtNodesFactoryImpl extends EFactoryImpl implements ExtNodesFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ExtNodesFactory init() { try { ExtNodesFactory theExtNodesFactory = (ExtNodesFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/rmf/serialization/model/extnodes.ecore"); if (theExtNodesFactory != null) { return theExtNodesFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new ExtNodesFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ExtNodesFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case ExtNodesPackage.EXTENDED_NODE: return createExtendedNode(); case ExtNodesPackage.EXTENSION: return createExtension(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ExtendedNode createExtendedNode() { ExtendedNodeImpl extendedNode = new ExtendedNodeImpl(); return extendedNode; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Extension createExtension() { ExtensionImpl extension = new ExtensionImpl(); return extension; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ExtNodesPackage getExtNodesPackage() { return (ExtNodesPackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static ExtNodesPackage getPackage() { return ExtNodesPackage.eINSTANCE; } } //ExtNodesFactoryImpl