| /* |
| * Copyright (c) 2011 CEA 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: |
| * CEA - initial API and implementation |
| * |
| */ |
| package org.eclipse.uml2.uml.profile.l3.internal.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.uml2.uml.profile.l3.*; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class L3FactoryImpl |
| extends EFactoryImpl |
| implements L3Factory { |
| |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static L3Factory init() { |
| try { |
| L3Factory theL3Factory = (L3Factory) EPackage.Registry.INSTANCE |
| .getEFactory("http://www.eclipse.org/uml2/4.0.0/UML/Profile/L3"); //$NON-NLS-1$ |
| if (theL3Factory != null) { |
| return theL3Factory; |
| } |
| } catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new L3FactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public L3FactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case L3Package.BUILD_COMPONENT : |
| return createBuildComponent(); |
| case L3Package.METAMODEL : |
| return createMetamodel(); |
| case L3Package.SYSTEM_MODEL : |
| return createSystemModel(); |
| 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 |
| */ |
| public BuildComponent createBuildComponent() { |
| BuildComponentImpl buildComponent = new BuildComponentImpl(); |
| return buildComponent; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Metamodel createMetamodel() { |
| MetamodelImpl metamodel = new MetamodelImpl(); |
| return metamodel; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public SystemModel createSystemModel() { |
| SystemModelImpl systemModel = new SystemModelImpl(); |
| return systemModel; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public L3Package getL3Package() { |
| return (L3Package) getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static L3Package getPackage() { |
| return L3Package.eINSTANCE; |
| } |
| |
| } //L3FactoryImpl |