| /********************************************************************* |
| * Copyright (c) 2009, 2012 SpringSource, a division of VMware, Inc. |
| * |
| * This program and the accompanying materials are made |
| * available under the terms of the Eclipse Public License 2.0 |
| * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| **********************************************************************/ |
| |
| package org.eclipse.virgo.ide.par.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.virgo.ide.par.Bundle; |
| import org.eclipse.virgo.ide.par.Par; |
| import org.eclipse.virgo.ide.par.ParFactory; |
| import org.eclipse.virgo.ide.par.ParPackage; |
| |
| /** |
| * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public class ParFactoryImpl extends EFactoryImpl implements ParFactory { |
| |
| /** |
| * Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public static ParFactory init() { |
| try { |
| ParFactory theParFactory = (ParFactory) EPackage.Registry.INSTANCE.getEFactory("http://eclipse.org/virgo/par.ecore"); |
| if (theParFactory != null) { |
| return theParFactory; |
| } |
| } catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new ParFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public ParFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case ParPackage.PAR: |
| return createPar(); |
| case ParPackage.BUNDLE: |
| return createBundle(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public Par createPar() { |
| ParImpl par = new ParImpl(); |
| return par; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public Bundle createBundle() { |
| BundleImpl bundle = new BundleImpl(); |
| return bundle; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public ParPackage getParPackage() { |
| return (ParPackage) getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static ParPackage getPackage() { |
| return ParPackage.eINSTANCE; |
| } |
| |
| } // ParFactoryImpl |