| /** |
| * Copyright (c) 2011-2013 EclipseSource Muenchen GmbH and others. |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| */ |
| package org.eclipse.emf.ecp.view.edapt.util.test.model.x.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.ecp.view.edapt.util.test.model.x.EdaptTestX; |
| import org.eclipse.emf.ecp.view.edapt.util.test.model.x.EdaptTestXFactory; |
| import org.eclipse.emf.ecp.view.edapt.util.test.model.x.EdaptTestXPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public class EdaptTestXFactoryImpl extends EFactoryImpl implements EdaptTestXFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public static EdaptTestXFactory init() { |
| try { |
| final EdaptTestXFactory theXFactory = (EdaptTestXFactory) EPackage.Registry.INSTANCE |
| .getEFactory(EdaptTestXPackage.eNS_URI); |
| if (theXFactory != null) { |
| return theXFactory; |
| } |
| } catch (final Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new EdaptTestXFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public EdaptTestXFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case EdaptTestXPackage.X: |
| return createX(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public EdaptTestX createX() { |
| final EdaptTestXImpl x = new EdaptTestXImpl(); |
| return x; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public EdaptTestXPackage getXPackage() { |
| return (EdaptTestXPackage) getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static EdaptTestXPackage getPackage() { |
| return EdaptTestXPackage.eINSTANCE; |
| } |
| |
| } // EdaptTestXFactoryImpl |