blob: eb8a8c94f20f7f9bb014412fa50a6de18c8cb5e5 [file] [log] [blame]
/*****************************************************************************
* Copyright (c) 2009 CEA LIST.
*
*
* 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:
* Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.allocations.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.papyrus.sysml.allocations.Allocate;
import org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition;
import org.eclipse.papyrus.sysml.allocations.Allocated;
import org.eclipse.papyrus.sysml.allocations.AllocationsFactory;
import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
/**
* <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
* end-user-doc -->
*
* @generated
*/
public class AllocationsFactoryImpl extends EFactoryImpl implements AllocationsFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @deprecated
* @generated
*/
@Deprecated
public static AllocationsPackage getPackage() {
return AllocationsPackage.eINSTANCE;
}
/**
* Creates the default factory implementation.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @generated
*/
public static AllocationsFactory init() {
try {
AllocationsFactory theAllocationsFactory = (AllocationsFactory) EPackage.Registry.INSTANCE.getEFactory(AllocationsPackage.eNS_URI);
if (theAllocationsFactory != null) {
return theAllocationsFactory;
}
} catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new AllocationsFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @generated
*/
public AllocationsFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case AllocationsPackage.ALLOCATE:
return createAllocate();
case AllocationsPackage.ALLOCATED:
return createAllocated();
case AllocationsPackage.ALLOCATE_ACTIVITY_PARTITION:
return createAllocateActivityPartition();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public Allocate createAllocate() {
AllocateImpl allocate = new AllocateImpl();
return allocate;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public AllocateActivityPartition createAllocateActivityPartition() {
AllocateActivityPartitionImpl allocateActivityPartition = new AllocateActivityPartitionImpl();
return allocateActivityPartition;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public Allocated createAllocated() {
AllocatedImpl allocated = new AllocatedImpl();
return allocated;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public AllocationsPackage getAllocationsPackage() {
return (AllocationsPackage) getEPackage();
}
} // AllocationsFactoryImpl