| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package de.uka.ipd.sdq.pcm.cost.impl; |
| 8 | |
| 9 | import de.uka.ipd.sdq.pcm.cost.*; |
| 10 | |
| 11 | import org.eclipse.emf.ecore.EClass; |
| 12 | import org.eclipse.emf.ecore.EObject; |
| 13 | import org.eclipse.emf.ecore.EPackage; |
| 14 | |
| 15 | import org.eclipse.emf.ecore.impl.EFactoryImpl; |
| 16 | |
| 17 | import org.eclipse.emf.ecore.plugin.EcorePlugin; |
| 18 | |
| 19 | /** |
| 20 | * <!-- begin-user-doc --> |
| 21 | * An implementation of the model <b>Factory</b>. |
| 22 | * <!-- end-user-doc --> |
| 23 | * @generated |
| 24 | */ |
| 25 | public class costFactoryImpl extends EFactoryImpl implements costFactory { |
| 26 | /** |
| 27 | * Creates the default factory implementation. |
| 28 | * <!-- begin-user-doc --> |
| 29 | * <!-- end-user-doc --> |
| 30 | * @generated |
| 31 | */ |
| 32 | public static costFactory init() { |
| 33 | try { |
| 34 | costFactory thecostFactory = (costFactory)EPackage.Registry.INSTANCE.getEFactory("http://sdq.ipd.uka.de/CostModel/1.0"); |
| 35 | if (thecostFactory != null) { |
| 36 | return thecostFactory; |
| 37 | } |
| 38 | } |
| 39 | catch (Exception exception) { |
| 40 | EcorePlugin.INSTANCE.log(exception); |
| 41 | } |
| 42 | return new costFactoryImpl(); |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Creates an instance of the factory. |
| 47 | * <!-- begin-user-doc --> |
| 48 | * <!-- end-user-doc --> |
| 49 | * @generated |
| 50 | */ |
| 51 | public costFactoryImpl() { |
| 52 | super(); |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * <!-- begin-user-doc --> |
| 57 | * <!-- end-user-doc --> |
| 58 | * @generated |
| 59 | */ |
| 60 | @Override |
| 61 | public EObject create(EClass eClass) { |
| 62 | switch (eClass.getClassifierID()) { |
| 63 | case costPackage.COMPONENT_COST: return createComponentCost(); |
| 64 | case costPackage.FIXED_LINKING_RESOURCE_COST: return createFixedLinkingResourceCost(); |
| 65 | case costPackage.FIXED_PROCESSING_RESOURCE_COST: return createFixedProcessingResourceCost(); |
| 66 | case costPackage.VARIABLE_LINKING_RESOURCE_COST: return createVariableLinkingResourceCost(); |
| 67 | case costPackage.VARIABLE_PROCESSING_RESOURCE_COST: return createVariableProcessingResourceCost(); |
| 68 | case costPackage.SCALAR_FUNCTION: return createScalarFunction(); |
| 69 | case costPackage.COST_REPOSITORY: return createCostRepository(); |
| 70 | case costPackage.COMPONENT_COST_PER_INSTANCE: return createComponentCostPerInstance(); |
| 71 | default: |
| 72 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * <!-- begin-user-doc --> |
| 78 | * <!-- end-user-doc --> |
| 79 | * @generated |
| 80 | */ |
| 81 | public ComponentCost createComponentCost() { |
| 82 | ComponentCostImpl componentCost = new ComponentCostImpl(); |
| 83 | return componentCost; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * <!-- begin-user-doc --> |
| 88 | * <!-- end-user-doc --> |
| 89 | * @generated |
| 90 | */ |
| 91 | public FixedLinkingResourceCost createFixedLinkingResourceCost() { |
| 92 | FixedLinkingResourceCostImpl fixedLinkingResourceCost = new FixedLinkingResourceCostImpl(); |
| 93 | return fixedLinkingResourceCost; |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * <!-- begin-user-doc --> |
| 98 | * <!-- end-user-doc --> |
| 99 | * @generated |
| 100 | */ |
| 101 | public FixedProcessingResourceCost createFixedProcessingResourceCost() { |
| 102 | FixedProcessingResourceCostImpl fixedProcessingResourceCost = new FixedProcessingResourceCostImpl(); |
| 103 | return fixedProcessingResourceCost; |
| 104 | } |
| 105 | |
| 106 | /** |
| 107 | * <!-- begin-user-doc --> |
| 108 | * <!-- end-user-doc --> |
| 109 | * @generated |
| 110 | */ |
| 111 | public VariableLinkingResourceCost createVariableLinkingResourceCost() { |
| 112 | VariableLinkingResourceCostImpl variableLinkingResourceCost = new VariableLinkingResourceCostImpl(); |
| 113 | return variableLinkingResourceCost; |
| 114 | } |
| 115 | |
| 116 | /** |
| 117 | * <!-- begin-user-doc --> |
| 118 | * <!-- end-user-doc --> |
| 119 | * @generated |
| 120 | */ |
| 121 | public VariableProcessingResourceCost createVariableProcessingResourceCost() { |
| 122 | VariableProcessingResourceCostImpl variableProcessingResourceCost = new VariableProcessingResourceCostImpl(); |
| 123 | return variableProcessingResourceCost; |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * <!-- begin-user-doc --> |
| 128 | * <!-- end-user-doc --> |
| 129 | * @generated |
| 130 | */ |
| 131 | public ScalarFunction createScalarFunction() { |
| 132 | ScalarFunctionImpl scalarFunction = new ScalarFunctionImpl(); |
| 133 | return scalarFunction; |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * <!-- begin-user-doc --> |
| 138 | * <!-- end-user-doc --> |
| 139 | * @generated |
| 140 | */ |
| 141 | public CostRepository createCostRepository() { |
| 142 | CostRepositoryImpl costRepository = new CostRepositoryImpl(); |
| 143 | return costRepository; |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * <!-- begin-user-doc --> |
| 148 | * <!-- end-user-doc --> |
| 149 | * @generated |
| 150 | */ |
| 151 | public ComponentCostPerInstance createComponentCostPerInstance() { |
| 152 | ComponentCostPerInstanceImpl componentCostPerInstance = new ComponentCostPerInstanceImpl(); |
| 153 | return componentCostPerInstance; |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * <!-- begin-user-doc --> |
| 158 | * <!-- end-user-doc --> |
| 159 | * @generated |
| 160 | */ |
| 161 | public costPackage getcostPackage() { |
| 162 | return (costPackage)getEPackage(); |
| 163 | } |
| 164 | |
| 165 | /** |
| 166 | * <!-- begin-user-doc --> |
| 167 | * <!-- end-user-doc --> |
| 168 | * @deprecated |
| 169 | * @generated |
| 170 | */ |
| 171 | @Deprecated |
| 172 | public static costPackage getPackage() { |
| 173 | return costPackage.eINSTANCE; |
| 174 | } |
| 175 | |
| 176 | } //costFactoryImpl |