| /******************************************************************************* |
| * Copyright (c) 2006, 2018 IBM Corporation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v2.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v20.html |
| * |
| * Contributors: |
| * IBM - Initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.ocl.utilities.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.ocl.utilities.*; |
| import org.eclipse.ocl.utilities.UtilitiesFactory; |
| import org.eclipse.ocl.utilities.UtilitiesPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class UtilitiesFactoryImpl |
| extends EFactoryImpl |
| implements UtilitiesFactory { |
| |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static UtilitiesFactory init() { |
| try { |
| UtilitiesFactory theUtilitiesFactory = (UtilitiesFactory) EPackage.Registry.INSTANCE |
| .getEFactory(UtilitiesPackage.eNS_URI); |
| if (theUtilitiesFactory != null) { |
| return theUtilitiesFactory; |
| } |
| } catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new UtilitiesFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public UtilitiesFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| default : |
| throw new IllegalArgumentException("The class '" //$NON-NLS-1$ |
| + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public UtilitiesPackage getUtilitiesPackage() { |
| return (UtilitiesPackage) getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static UtilitiesPackage getPackage() { |
| return UtilitiesPackage.eINSTANCE; |
| } |
| |
| } //UtilitiesFactoryImpl |