| 1 | /** |
| 2 | * Copyright 2006, SDQ Group, University Karlsruhe (TH) |
| 3 | * |
| 4 | * $Id$ |
| 5 | */ |
| 6 | package de.uka.ipd.sdq.context.computed_allocation.impl; |
| 7 | |
| 8 | import org.eclipse.emf.ecore.EClass; |
| 9 | import org.eclipse.emf.ecore.EObject; |
| 10 | import org.eclipse.emf.ecore.EPackage; |
| 11 | import org.eclipse.emf.ecore.impl.EFactoryImpl; |
| 12 | import org.eclipse.emf.ecore.plugin.EcorePlugin; |
| 13 | |
| 14 | import de.uka.ipd.sdq.context.computed_allocation.ComputedAllocation; |
| 15 | import de.uka.ipd.sdq.context.computed_allocation.ComputedAllocationContext; |
| 16 | import de.uka.ipd.sdq.context.computed_allocation.ComputedAllocationFactory; |
| 17 | import de.uka.ipd.sdq.context.computed_allocation.ComputedAllocationPackage; |
| 18 | import de.uka.ipd.sdq.context.computed_allocation.ResourceDemand; |
| 19 | |
| 20 | /** |
| 21 | * <!-- begin-user-doc --> |
| 22 | * An implementation of the model <b>Factory</b>. |
| 23 | * <!-- end-user-doc --> |
| 24 | * @generated |
| 25 | */ |
| 26 | public class ComputedAllocationFactoryImpl extends EFactoryImpl implements ComputedAllocationFactory { |
| 27 | /** |
| 28 | * <!-- begin-user-doc --> |
| 29 | * <!-- end-user-doc --> |
| 30 | * @generated |
| 31 | */ |
| 32 | public static final String copyright = "Copyright 2006, SDQ Group, University Karlsruhe (TH)"; |
| 33 | |
| 34 | /** |
| 35 | * Creates the default factory implementation. |
| 36 | * <!-- begin-user-doc --> |
| 37 | * <!-- end-user-doc --> |
| 38 | * @generated |
| 39 | */ |
| 40 | public static ComputedAllocationFactory init() { |
| 41 | try { |
| 42 | ComputedAllocationFactory theComputedAllocationFactory = (ComputedAllocationFactory)EPackage.Registry.INSTANCE.getEFactory("http://sdq.ipd.uka.de/Context/Allocation/1.0"); |
| 43 | if (theComputedAllocationFactory != null) { |
| 44 | return theComputedAllocationFactory; |
| 45 | } |
| 46 | } |
| 47 | catch (Exception exception) { |
| 48 | EcorePlugin.INSTANCE.log(exception); |
| 49 | } |
| 50 | return new ComputedAllocationFactoryImpl(); |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Creates an instance of the factory. |
| 55 | * <!-- begin-user-doc --> |
| 56 | * <!-- end-user-doc --> |
| 57 | * @generated |
| 58 | */ |
| 59 | public ComputedAllocationFactoryImpl() { |
| 60 | super(); |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * <!-- begin-user-doc --> |
| 65 | * <!-- end-user-doc --> |
| 66 | * @generated |
| 67 | */ |
| 68 | @Override |
| 69 | public EObject create(EClass eClass) { |
| 70 | switch (eClass.getClassifierID()) { |
| 71 | case ComputedAllocationPackage.COMPUTED_ALLOCATION_CONTEXT: return createComputedAllocationContext(); |
| 72 | case ComputedAllocationPackage.RESOURCE_DEMAND: return createResourceDemand(); |
| 73 | case ComputedAllocationPackage.COMPUTED_ALLOCATION: return createComputedAllocation(); |
| 74 | default: |
| 75 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | /** |
| 80 | * <!-- begin-user-doc --> |
| 81 | * <!-- end-user-doc --> |
| 82 | * @generated |
| 83 | */ |
| 84 | public ComputedAllocationContext createComputedAllocationContext() { |
| 85 | ComputedAllocationContextImpl computedAllocationContext = new ComputedAllocationContextImpl(); |
| 86 | return computedAllocationContext; |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * <!-- begin-user-doc --> |
| 91 | * <!-- end-user-doc --> |
| 92 | * @generated |
| 93 | */ |
| 94 | public ResourceDemand createResourceDemand() { |
| 95 | ResourceDemandImpl resourceDemand = new ResourceDemandImpl(); |
| 96 | return resourceDemand; |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * <!-- begin-user-doc --> |
| 101 | * <!-- end-user-doc --> |
| 102 | * @generated |
| 103 | */ |
| 104 | public ComputedAllocation createComputedAllocation() { |
| 105 | ComputedAllocationImpl computedAllocation = new ComputedAllocationImpl(); |
| 106 | return computedAllocation; |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * <!-- begin-user-doc --> |
| 111 | * <!-- end-user-doc --> |
| 112 | * @generated |
| 113 | */ |
| 114 | public ComputedAllocationPackage getComputedAllocationPackage() { |
| 115 | return (ComputedAllocationPackage)getEPackage(); |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * <!-- begin-user-doc --> |
| 120 | * <!-- end-user-doc --> |
| 121 | * @deprecated |
| 122 | * @generated |
| 123 | */ |
| 124 | @Deprecated |
| 125 | public static ComputedAllocationPackage getPackage() { |
| 126 | return ComputedAllocationPackage.eINSTANCE; |
| 127 | } |
| 128 | |
| 129 | } //ComputedAllocationFactoryImpl |