| 1 | /** |
| 2 | * Copyright 2006, SDQ Group, University Karlsruhe (TH) |
| 3 | * |
| 4 | * $Id$ |
| 5 | */ |
| 6 | package de.uka.ipd.sdq.context.aggregatedUsageContext.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.aggregatedUsageContext.AggregatedCommunication; |
| 15 | import de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedResourceDemand; |
| 16 | import de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedUsageContextFactory; |
| 17 | import de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedUsageContextPackage; |
| 18 | import de.uka.ipd.sdq.context.aggregatedUsageContext.ComputedAggregatedUsage; |
| 19 | import de.uka.ipd.sdq.context.aggregatedUsageContext.ServiceExecutionContext; |
| 20 | |
| 21 | /** |
| 22 | * <!-- begin-user-doc --> |
| 23 | * An implementation of the model <b>Factory</b>. |
| 24 | * <!-- end-user-doc --> |
| 25 | * @generated |
| 26 | */ |
| 27 | public class AggregatedUsageContextFactoryImpl extends EFactoryImpl implements AggregatedUsageContextFactory { |
| 28 | /** |
| 29 | * <!-- begin-user-doc --> |
| 30 | * <!-- end-user-doc --> |
| 31 | * @generated |
| 32 | */ |
| 33 | public static final String copyright = "Copyright 2006, SDQ Group, University Karlsruhe (TH)"; |
| 34 | |
| 35 | /** |
| 36 | * Creates the default factory implementation. |
| 37 | * <!-- begin-user-doc --> |
| 38 | * <!-- end-user-doc --> |
| 39 | * @generated |
| 40 | */ |
| 41 | public static AggregatedUsageContextFactory init() { |
| 42 | try { |
| 43 | AggregatedUsageContextFactory theAggregatedUsageContextFactory = (AggregatedUsageContextFactory)EPackage.Registry.INSTANCE.getEFactory("http:///context/aggregatedUsageContext.ecore"); |
| 44 | if (theAggregatedUsageContextFactory != null) { |
| 45 | return theAggregatedUsageContextFactory; |
| 46 | } |
| 47 | } |
| 48 | catch (Exception exception) { |
| 49 | EcorePlugin.INSTANCE.log(exception); |
| 50 | } |
| 51 | return new AggregatedUsageContextFactoryImpl(); |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Creates an instance of the factory. |
| 56 | * <!-- begin-user-doc --> |
| 57 | * <!-- end-user-doc --> |
| 58 | * @generated |
| 59 | */ |
| 60 | public AggregatedUsageContextFactoryImpl() { |
| 61 | super(); |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * <!-- begin-user-doc --> |
| 66 | * <!-- end-user-doc --> |
| 67 | * @generated |
| 68 | */ |
| 69 | @Override |
| 70 | public EObject create(EClass eClass) { |
| 71 | switch (eClass.getClassifierID()) { |
| 72 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT: return createServiceExecutionContext(); |
| 73 | case AggregatedUsageContextPackage.AGGREGATED_RESOURCE_DEMAND: return createAggregatedResourceDemand(); |
| 74 | case AggregatedUsageContextPackage.AGGREGATED_COMMUNICATION: return createAggregatedCommunication(); |
| 75 | case AggregatedUsageContextPackage.COMPUTED_AGGREGATED_USAGE: return createComputedAggregatedUsage(); |
| 76 | default: |
| 77 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | /** |
| 82 | * <!-- begin-user-doc --> |
| 83 | * <!-- end-user-doc --> |
| 84 | * @generated |
| 85 | */ |
| 86 | public ServiceExecutionContext createServiceExecutionContext() { |
| 87 | ServiceExecutionContextImpl serviceExecutionContext = new ServiceExecutionContextImpl(); |
| 88 | return serviceExecutionContext; |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | * <!-- begin-user-doc --> |
| 93 | * <!-- end-user-doc --> |
| 94 | * @generated |
| 95 | */ |
| 96 | public AggregatedResourceDemand createAggregatedResourceDemand() { |
| 97 | AggregatedResourceDemandImpl aggregatedResourceDemand = new AggregatedResourceDemandImpl(); |
| 98 | return aggregatedResourceDemand; |
| 99 | } |
| 100 | |
| 101 | /** |
| 102 | * <!-- begin-user-doc --> |
| 103 | * <!-- end-user-doc --> |
| 104 | * @generated |
| 105 | */ |
| 106 | public AggregatedCommunication createAggregatedCommunication() { |
| 107 | AggregatedCommunicationImpl aggregatedCommunication = new AggregatedCommunicationImpl(); |
| 108 | return aggregatedCommunication; |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * <!-- begin-user-doc --> |
| 113 | * <!-- end-user-doc --> |
| 114 | * @generated |
| 115 | */ |
| 116 | public ComputedAggregatedUsage createComputedAggregatedUsage() { |
| 117 | ComputedAggregatedUsageImpl computedAggregatedUsage = new ComputedAggregatedUsageImpl(); |
| 118 | return computedAggregatedUsage; |
| 119 | } |
| 120 | |
| 121 | /** |
| 122 | * <!-- begin-user-doc --> |
| 123 | * <!-- end-user-doc --> |
| 124 | * @generated |
| 125 | */ |
| 126 | public AggregatedUsageContextPackage getAggregatedUsageContextPackage() { |
| 127 | return (AggregatedUsageContextPackage)getEPackage(); |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * <!-- begin-user-doc --> |
| 132 | * <!-- end-user-doc --> |
| 133 | * @deprecated |
| 134 | * @generated |
| 135 | */ |
| 136 | @Deprecated |
| 137 | public static AggregatedUsageContextPackage getPackage() { |
| 138 | return AggregatedUsageContextPackage.eINSTANCE; |
| 139 | } |
| 140 | |
| 141 | } //AggregatedUsageContextFactoryImpl |