| /** |
| * Copyright (c) 2013 CEA LIST. |
| * |
| * |
| * 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: |
| * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation |
| */ |
| package org.eclipse.papyrus.infra.nattable.model.cdo.nattable.nattableproblem.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.papyrus.infra.nattable.model.nattable.nattableproblem.NattableproblemFactory; |
| import org.eclipse.papyrus.infra.nattable.model.nattable.nattableproblem.NattableproblemPackage; |
| import org.eclipse.papyrus.infra.nattable.model.nattable.nattableproblem.Problem; |
| import org.eclipse.papyrus.infra.nattable.model.nattable.nattableproblem.StringResolutionProblem; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class NattableproblemFactoryImpl extends EFactoryImpl implements NattableproblemFactory { |
| |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static NattableproblemFactory init() { |
| try { |
| NattableproblemFactory theNattableproblemFactory = (NattableproblemFactory)EPackage.Registry.INSTANCE.getEFactory(NattableproblemPackage.eNS_URI); |
| if (theNattableproblemFactory != null) { |
| return theNattableproblemFactory; |
| } |
| } |
| catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new NattableproblemFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NattableproblemFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case NattableproblemPackage.PROBLEM: return createProblem(); |
| case NattableproblemPackage.STRING_RESOLUTION_PROBLEM: return createStringResolutionProblem(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Problem createProblem() { |
| ProblemImpl problem = new ProblemImpl(); |
| return problem; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public StringResolutionProblem createStringResolutionProblem() { |
| StringResolutionProblemImpl stringResolutionProblem = new StringResolutionProblemImpl(); |
| return stringResolutionProblem; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NattableproblemPackage getNattableproblemPackage() { |
| return (NattableproblemPackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static NattableproblemPackage getPackage() { |
| return NattableproblemPackage.eINSTANCE; |
| } |
| } // NattableproblemFactoryImpl |