| 1 | /** |
| 2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
| 3 | * |
| 4 | * $Id$ |
| 5 | */ |
| 6 | package de.uka.ipd.sdq.pcm.seff.impl; |
| 7 | |
| 8 | import de.uka.ipd.sdq.pcm.seff.*; |
| 9 | import org.eclipse.emf.ecore.EClass; |
| 10 | import org.eclipse.emf.ecore.EObject; |
| 11 | import org.eclipse.emf.ecore.EPackage; |
| 12 | import org.eclipse.emf.ecore.impl.EFactoryImpl; |
| 13 | import org.eclipse.emf.ecore.plugin.EcorePlugin; |
| 14 | |
| 15 | import de.uka.ipd.sdq.pcm.seff.AcquireAction; |
| 16 | import de.uka.ipd.sdq.pcm.seff.BranchAction; |
| 17 | import de.uka.ipd.sdq.pcm.seff.CallReturnAction; |
| 18 | import de.uka.ipd.sdq.pcm.seff.CollectionIteratorAction; |
| 19 | import de.uka.ipd.sdq.pcm.seff.EmitEventAction; |
| 20 | import de.uka.ipd.sdq.pcm.seff.ExternalCallAction; |
| 21 | import de.uka.ipd.sdq.pcm.seff.ForkAction; |
| 22 | import de.uka.ipd.sdq.pcm.seff.ForkedBehaviour; |
| 23 | import de.uka.ipd.sdq.pcm.seff.GuardedBranchTransition; |
| 24 | import de.uka.ipd.sdq.pcm.seff.InternalAction; |
| 25 | import de.uka.ipd.sdq.pcm.seff.InternalCallAction; |
| 26 | import de.uka.ipd.sdq.pcm.seff.LoopAction; |
| 27 | import de.uka.ipd.sdq.pcm.seff.ProbabilisticBranchTransition; |
| 28 | import de.uka.ipd.sdq.pcm.seff.ReleaseAction; |
| 29 | import de.uka.ipd.sdq.pcm.seff.ResourceDemandingBehaviour; |
| 30 | import de.uka.ipd.sdq.pcm.seff.ResourceDemandingInternalBehaviour; |
| 31 | import de.uka.ipd.sdq.pcm.seff.ResourceDemandingSEFF; |
| 32 | import de.uka.ipd.sdq.pcm.seff.SeffFactory; |
| 33 | import de.uka.ipd.sdq.pcm.seff.SeffPackage; |
| 34 | import de.uka.ipd.sdq.pcm.seff.SetVariableAction; |
| 35 | import de.uka.ipd.sdq.pcm.seff.StartAction; |
| 36 | import de.uka.ipd.sdq.pcm.seff.StopAction; |
| 37 | import de.uka.ipd.sdq.pcm.seff.SynchronisationPoint; |
| 38 | |
| 39 | /** |
| 40 | * <!-- begin-user-doc --> |
| 41 | * An implementation of the model <b>Factory</b>. |
| 42 | * <!-- end-user-doc --> |
| 43 | * @generated |
| 44 | */ |
| 45 | public class SeffFactoryImpl extends EFactoryImpl implements SeffFactory { |
| 46 | /** |
| 47 | * <!-- begin-user-doc --> |
| 48 | * <!-- end-user-doc --> |
| 49 | * @generated |
| 50 | */ |
| 51 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
| 52 | |
| 53 | /** |
| 54 | * Creates the default factory implementation. |
| 55 | * <!-- begin-user-doc --> |
| 56 | * <!-- end-user-doc --> |
| 57 | * @generated |
| 58 | */ |
| 59 | public static SeffFactory init() { |
| 60 | try { |
| 61 | SeffFactory theSeffFactory = (SeffFactory)EPackage.Registry.INSTANCE.getEFactory("http://sdq.ipd.uka.de/PalladioComponentModel/SEFF/4.0"); |
| 62 | if (theSeffFactory != null) { |
| 63 | return theSeffFactory; |
| 64 | } |
| 65 | } |
| 66 | catch (Exception exception) { |
| 67 | EcorePlugin.INSTANCE.log(exception); |
| 68 | } |
| 69 | return new SeffFactoryImpl(); |
| 70 | } |
| 71 | |
| 72 | /** |
| 73 | * Creates an instance of the factory. |
| 74 | * <!-- begin-user-doc --> |
| 75 | * <!-- end-user-doc --> |
| 76 | * @generated |
| 77 | */ |
| 78 | public SeffFactoryImpl() { |
| 79 | super(); |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * <!-- begin-user-doc --> |
| 84 | * <!-- end-user-doc --> |
| 85 | * @generated |
| 86 | */ |
| 87 | @Override |
| 88 | public EObject create(EClass eClass) { |
| 89 | switch (eClass.getClassifierID()) { |
| 90 | case SeffPackage.STOP_ACTION: return createStopAction(); |
| 91 | case SeffPackage.RESOURCE_DEMANDING_BEHAVIOUR: return createResourceDemandingBehaviour(); |
| 92 | case SeffPackage.BRANCH_ACTION: return createBranchAction(); |
| 93 | case SeffPackage.START_ACTION: return createStartAction(); |
| 94 | case SeffPackage.RESOURCE_DEMANDING_SEFF: return createResourceDemandingSEFF(); |
| 95 | case SeffPackage.RESOURCE_DEMANDING_INTERNAL_BEHAVIOUR: return createResourceDemandingInternalBehaviour(); |
| 96 | case SeffPackage.RELEASE_ACTION: return createReleaseAction(); |
| 97 | case SeffPackage.LOOP_ACTION: return createLoopAction(); |
| 98 | case SeffPackage.FORK_ACTION: return createForkAction(); |
| 99 | case SeffPackage.FORKED_BEHAVIOUR: return createForkedBehaviour(); |
| 100 | case SeffPackage.SYNCHRONISATION_POINT: return createSynchronisationPoint(); |
| 101 | case SeffPackage.EXTERNAL_CALL_ACTION: return createExternalCallAction(); |
| 102 | case SeffPackage.CALL_RETURN_ACTION: return createCallReturnAction(); |
| 103 | case SeffPackage.PROBABILISTIC_BRANCH_TRANSITION: return createProbabilisticBranchTransition(); |
| 104 | case SeffPackage.ACQUIRE_ACTION: return createAcquireAction(); |
| 105 | case SeffPackage.COLLECTION_ITERATOR_ACTION: return createCollectionIteratorAction(); |
| 106 | case SeffPackage.GUARDED_BRANCH_TRANSITION: return createGuardedBranchTransition(); |
| 107 | case SeffPackage.SET_VARIABLE_ACTION: return createSetVariableAction(); |
| 108 | case SeffPackage.INTERNAL_CALL_ACTION: return createInternalCallAction(); |
| 109 | case SeffPackage.EMIT_EVENT_ACTION: return createEmitEventAction(); |
| 110 | case SeffPackage.INTERNAL_ACTION: return createInternalAction(); |
| 111 | default: |
| 112 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | /** |
| 117 | * <!-- begin-user-doc --> |
| 118 | * <!-- end-user-doc --> |
| 119 | * @generated |
| 120 | */ |
| 121 | public StopAction createStopAction() { |
| 122 | StopActionImpl stopAction = new StopActionImpl(); |
| 123 | return stopAction; |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * <!-- begin-user-doc --> |
| 128 | * <!-- end-user-doc --> |
| 129 | * @generated |
| 130 | */ |
| 131 | public ResourceDemandingBehaviour createResourceDemandingBehaviour() { |
| 132 | ResourceDemandingBehaviourImpl resourceDemandingBehaviour = new ResourceDemandingBehaviourImpl(); |
| 133 | return resourceDemandingBehaviour; |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * <!-- begin-user-doc --> |
| 138 | * <!-- end-user-doc --> |
| 139 | * @generated |
| 140 | */ |
| 141 | public BranchAction createBranchAction() { |
| 142 | BranchActionImpl branchAction = new BranchActionImpl(); |
| 143 | return branchAction; |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * <!-- begin-user-doc --> |
| 148 | * <!-- end-user-doc --> |
| 149 | * @generated |
| 150 | */ |
| 151 | public StartAction createStartAction() { |
| 152 | StartActionImpl startAction = new StartActionImpl(); |
| 153 | return startAction; |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * <!-- begin-user-doc --> |
| 158 | * <!-- end-user-doc --> |
| 159 | * @generated |
| 160 | */ |
| 161 | public ResourceDemandingSEFF createResourceDemandingSEFF() { |
| 162 | ResourceDemandingSEFFImpl resourceDemandingSEFF = new ResourceDemandingSEFFImpl(); |
| 163 | return resourceDemandingSEFF; |
| 164 | } |
| 165 | |
| 166 | /** |
| 167 | * <!-- begin-user-doc --> |
| 168 | * <!-- end-user-doc --> |
| 169 | * @generated |
| 170 | */ |
| 171 | public ResourceDemandingInternalBehaviour createResourceDemandingInternalBehaviour() { |
| 172 | ResourceDemandingInternalBehaviourImpl resourceDemandingInternalBehaviour = new ResourceDemandingInternalBehaviourImpl(); |
| 173 | return resourceDemandingInternalBehaviour; |
| 174 | } |
| 175 | |
| 176 | /** |
| 177 | * <!-- begin-user-doc --> |
| 178 | * <!-- end-user-doc --> |
| 179 | * @generated |
| 180 | */ |
| 181 | public ReleaseAction createReleaseAction() { |
| 182 | ReleaseActionImpl releaseAction = new ReleaseActionImpl(); |
| 183 | return releaseAction; |
| 184 | } |
| 185 | |
| 186 | /** |
| 187 | * <!-- begin-user-doc --> |
| 188 | * <!-- end-user-doc --> |
| 189 | * @generated |
| 190 | */ |
| 191 | public LoopAction createLoopAction() { |
| 192 | LoopActionImpl loopAction = new LoopActionImpl(); |
| 193 | return loopAction; |
| 194 | } |
| 195 | |
| 196 | /** |
| 197 | * <!-- begin-user-doc --> |
| 198 | * <!-- end-user-doc --> |
| 199 | * @generated |
| 200 | */ |
| 201 | public InternalAction createInternalAction() { |
| 202 | InternalActionImpl internalAction = new InternalActionImpl(); |
| 203 | return internalAction; |
| 204 | } |
| 205 | |
| 206 | /** |
| 207 | * <!-- begin-user-doc --> |
| 208 | * <!-- end-user-doc --> |
| 209 | * @generated |
| 210 | */ |
| 211 | public ForkAction createForkAction() { |
| 212 | ForkActionImpl forkAction = new ForkActionImpl(); |
| 213 | return forkAction; |
| 214 | } |
| 215 | |
| 216 | /** |
| 217 | * <!-- begin-user-doc --> |
| 218 | * <!-- end-user-doc --> |
| 219 | * @generated |
| 220 | */ |
| 221 | public ForkedBehaviour createForkedBehaviour() { |
| 222 | ForkedBehaviourImpl forkedBehaviour = new ForkedBehaviourImpl(); |
| 223 | return forkedBehaviour; |
| 224 | } |
| 225 | |
| 226 | /** |
| 227 | * <!-- begin-user-doc --> |
| 228 | * <!-- end-user-doc --> |
| 229 | * @generated |
| 230 | */ |
| 231 | public SynchronisationPoint createSynchronisationPoint() { |
| 232 | SynchronisationPointImpl synchronisationPoint = new SynchronisationPointImpl(); |
| 233 | return synchronisationPoint; |
| 234 | } |
| 235 | |
| 236 | /** |
| 237 | * <!-- begin-user-doc --> |
| 238 | * <!-- end-user-doc --> |
| 239 | * @generated |
| 240 | */ |
| 241 | public ExternalCallAction createExternalCallAction() { |
| 242 | ExternalCallActionImpl externalCallAction = new ExternalCallActionImpl(); |
| 243 | return externalCallAction; |
| 244 | } |
| 245 | |
| 246 | /** |
| 247 | * <!-- begin-user-doc --> |
| 248 | * <!-- end-user-doc --> |
| 249 | * @generated |
| 250 | */ |
| 251 | public CallReturnAction createCallReturnAction() { |
| 252 | CallReturnActionImpl callReturnAction = new CallReturnActionImpl(); |
| 253 | return callReturnAction; |
| 254 | } |
| 255 | |
| 256 | /** |
| 257 | * <!-- begin-user-doc --> |
| 258 | * <!-- end-user-doc --> |
| 259 | * @generated |
| 260 | */ |
| 261 | public ProbabilisticBranchTransition createProbabilisticBranchTransition() { |
| 262 | ProbabilisticBranchTransitionImpl probabilisticBranchTransition = new ProbabilisticBranchTransitionImpl(); |
| 263 | return probabilisticBranchTransition; |
| 264 | } |
| 265 | |
| 266 | /** |
| 267 | * <!-- begin-user-doc --> |
| 268 | * <!-- end-user-doc --> |
| 269 | * @generated |
| 270 | */ |
| 271 | public AcquireAction createAcquireAction() { |
| 272 | AcquireActionImpl acquireAction = new AcquireActionImpl(); |
| 273 | return acquireAction; |
| 274 | } |
| 275 | |
| 276 | /** |
| 277 | * <!-- begin-user-doc --> |
| 278 | * <!-- end-user-doc --> |
| 279 | * @generated |
| 280 | */ |
| 281 | public CollectionIteratorAction createCollectionIteratorAction() { |
| 282 | CollectionIteratorActionImpl collectionIteratorAction = new CollectionIteratorActionImpl(); |
| 283 | return collectionIteratorAction; |
| 284 | } |
| 285 | |
| 286 | /** |
| 287 | * <!-- begin-user-doc --> |
| 288 | * <!-- end-user-doc --> |
| 289 | * @generated |
| 290 | */ |
| 291 | public GuardedBranchTransition createGuardedBranchTransition() { |
| 292 | GuardedBranchTransitionImpl guardedBranchTransition = new GuardedBranchTransitionImpl(); |
| 293 | return guardedBranchTransition; |
| 294 | } |
| 295 | |
| 296 | /** |
| 297 | * <!-- begin-user-doc --> |
| 298 | * <!-- end-user-doc --> |
| 299 | * @generated |
| 300 | */ |
| 301 | public SetVariableAction createSetVariableAction() { |
| 302 | SetVariableActionImpl setVariableAction = new SetVariableActionImpl(); |
| 303 | return setVariableAction; |
| 304 | } |
| 305 | |
| 306 | /** |
| 307 | * <!-- begin-user-doc --> |
| 308 | * <!-- end-user-doc --> |
| 309 | * @generated |
| 310 | */ |
| 311 | public InternalCallAction createInternalCallAction() { |
| 312 | InternalCallActionImpl internalCallAction = new InternalCallActionImpl(); |
| 313 | return internalCallAction; |
| 314 | } |
| 315 | |
| 316 | /** |
| 317 | * <!-- begin-user-doc --> |
| 318 | * <!-- end-user-doc --> |
| 319 | * @generated |
| 320 | */ |
| 321 | public EmitEventAction createEmitEventAction() { |
| 322 | EmitEventActionImpl emitEventAction = new EmitEventActionImpl(); |
| 323 | return emitEventAction; |
| 324 | } |
| 325 | |
| 326 | /** |
| 327 | * <!-- begin-user-doc --> |
| 328 | * <!-- end-user-doc --> |
| 329 | * @generated |
| 330 | */ |
| 331 | public SeffPackage getSeffPackage() { |
| 332 | return (SeffPackage)getEPackage(); |
| 333 | } |
| 334 | |
| 335 | /** |
| 336 | * <!-- begin-user-doc --> |
| 337 | * <!-- end-user-doc --> |
| 338 | * @deprecated |
| 339 | * @generated |
| 340 | */ |
| 341 | @Deprecated |
| 342 | public static SeffPackage getPackage() { |
| 343 | return SeffPackage.eINSTANCE; |
| 344 | } |
| 345 | |
| 346 | } //SeffFactoryImpl |