| /***************************************************************************** |
| * Copyright (c) 2011, 2015 University of Padova, Intecs |
| * |
| * |
| * 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 |
| * |
| * |
| *****************************************************************************/ |
| package org.polarsys.chess.chessmlprofile.ComponentModel.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.polarsys.chess.chessmlprofile.ComponentModel.*; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class ComponentModelFactoryImpl extends EFactoryImpl implements ComponentModelFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static ComponentModelFactory init() { |
| try { |
| ComponentModelFactory theComponentModelFactory = (ComponentModelFactory)EPackage.Registry.INSTANCE.getEFactory(ComponentModelPackage.eNS_URI); |
| if (theComponentModelFactory != null) { |
| return theComponentModelFactory; |
| } |
| } |
| catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new ComponentModelFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ComponentModelFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case ComponentModelPackage.FUNCTIONAL_PARTITION: return createFunctionalPartition(); |
| case ComponentModelPackage.HW_ABSTRACTION_COMPONENT_IMPL: return createHwAbstractionComponentImpl(); |
| case ComponentModelPackage.COMPONENT_TYPE: return createComponentType(); |
| case ComponentModelPackage.COMPONENT_IMPLEMENTATION: return createComponentImplementation(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ComponentType createComponentType() { |
| ComponentTypeImpl componentType = new ComponentTypeImpl(); |
| return componentType; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ComponentImplementation createComponentImplementation() { |
| ComponentImplementationImpl componentImplementation = new ComponentImplementationImpl(); |
| return componentImplementation; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public FunctionalPartition createFunctionalPartition() { |
| FunctionalPartitionImpl functionalPartition = new FunctionalPartitionImpl(); |
| return functionalPartition; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public HwAbstractionComponentImpl createHwAbstractionComponentImpl() { |
| HwAbstractionComponentImplImpl hwAbstractionComponentImpl = new HwAbstractionComponentImplImpl(); |
| return hwAbstractionComponentImpl; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ComponentModelPackage getComponentModelPackage() { |
| return (ComponentModelPackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static ComponentModelPackage getPackage() { |
| return ComponentModelPackage.eINSTANCE; |
| } |
| |
| } //ComponentModelFactoryImpl |