| 1 | /** |
| 2 | * Copyright SDQ, IPD, U Karlsruhe, 2007 |
| 3 | * |
| 4 | * $Id$ |
| 5 | */ |
| 6 | package de.uka.ipd.sdq.completions.impl; |
| 7 | |
| 8 | import de.uka.ipd.sdq.completions.*; |
| 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.completions.Completion; |
| 16 | import de.uka.ipd.sdq.completions.CompletionRepository; |
| 17 | import de.uka.ipd.sdq.completions.CompletionsFactory; |
| 18 | import de.uka.ipd.sdq.completions.CompletionsPackage; |
| 19 | import de.uka.ipd.sdq.completions.DelegatingExternalCallAction; |
| 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 CompletionsFactoryImpl extends EFactoryImpl implements CompletionsFactory { |
| 28 | /** |
| 29 | * Creates the default factory implementation. |
| 30 | * <!-- begin-user-doc --> |
| 31 | * <!-- end-user-doc --> |
| 32 | * @generated |
| 33 | */ |
| 34 | public static CompletionsFactory init() { |
| 35 | try { |
| 36 | CompletionsFactory theCompletionsFactory = (CompletionsFactory)EPackage.Registry.INSTANCE.getEFactory("http://sdq.ipd.uka.de/Completions/1.0"); |
| 37 | if (theCompletionsFactory != null) { |
| 38 | return theCompletionsFactory; |
| 39 | } |
| 40 | } |
| 41 | catch (Exception exception) { |
| 42 | EcorePlugin.INSTANCE.log(exception); |
| 43 | } |
| 44 | return new CompletionsFactoryImpl(); |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Creates an instance of the factory. |
| 49 | * <!-- begin-user-doc --> |
| 50 | * <!-- end-user-doc --> |
| 51 | * @generated |
| 52 | */ |
| 53 | public CompletionsFactoryImpl() { |
| 54 | super(); |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * <!-- begin-user-doc --> |
| 59 | * <!-- end-user-doc --> |
| 60 | * @generated |
| 61 | */ |
| 62 | @Override |
| 63 | public EObject create(EClass eClass) { |
| 64 | switch (eClass.getClassifierID()) { |
| 65 | case CompletionsPackage.COMPLETION: return createCompletion(); |
| 66 | case CompletionsPackage.COMPLETION_REPOSITORY: return createCompletionRepository(); |
| 67 | case CompletionsPackage.DELEGATING_EXTERNAL_CALL_ACTION: return createDelegatingExternalCallAction(); |
| 68 | default: |
| 69 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * <!-- begin-user-doc --> |
| 75 | * <!-- end-user-doc --> |
| 76 | * @generated |
| 77 | */ |
| 78 | public Completion createCompletion() { |
| 79 | CompletionImpl completion = new CompletionImpl(); |
| 80 | return completion; |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * <!-- begin-user-doc --> |
| 85 | * <!-- end-user-doc --> |
| 86 | * @generated |
| 87 | */ |
| 88 | public CompletionRepository createCompletionRepository() { |
| 89 | CompletionRepositoryImpl completionRepository = new CompletionRepositoryImpl(); |
| 90 | return completionRepository; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * <!-- begin-user-doc --> |
| 95 | * <!-- end-user-doc --> |
| 96 | * @generated |
| 97 | */ |
| 98 | public DelegatingExternalCallAction createDelegatingExternalCallAction() { |
| 99 | DelegatingExternalCallActionImpl delegatingExternalCallAction = new DelegatingExternalCallActionImpl(); |
| 100 | return delegatingExternalCallAction; |
| 101 | } |
| 102 | |
| 103 | /** |
| 104 | * <!-- begin-user-doc --> |
| 105 | * <!-- end-user-doc --> |
| 106 | * @generated |
| 107 | */ |
| 108 | public CompletionsPackage getCompletionsPackage() { |
| 109 | return (CompletionsPackage)getEPackage(); |
| 110 | } |
| 111 | |
| 112 | /** |
| 113 | * <!-- begin-user-doc --> |
| 114 | * <!-- end-user-doc --> |
| 115 | * @deprecated |
| 116 | * @generated |
| 117 | */ |
| 118 | @Deprecated |
| 119 | public static CompletionsPackage getPackage() { |
| 120 | return CompletionsPackage.eINSTANCE; |
| 121 | } |
| 122 | |
| 123 | } //CompletionsFactoryImpl |