1 | /** |
2 | * Copyright SDQ, IPD, U Karlsruhe, 2007 |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.completions.impl; |
7 | |
8 | import org.eclipse.emf.ecore.EClass; |
9 | import org.eclipse.emf.ecore.EPackage; |
10 | import org.eclipse.emf.ecore.EReference; |
11 | import org.eclipse.emf.ecore.impl.EPackageImpl; |
12 | |
13 | import de.uka.ipd.sdq.completions.Completion; |
14 | import de.uka.ipd.sdq.completions.CompletionRepository; |
15 | import de.uka.ipd.sdq.completions.CompletionsFactory; |
16 | import de.uka.ipd.sdq.completions.CompletionsPackage; |
17 | import de.uka.ipd.sdq.completions.DelegatingExternalCallAction; |
18 | import de.uka.ipd.sdq.pcm.PcmPackage; |
19 | import de.uka.ipd.sdq.pcm.core.entity.EntityPackage; |
20 | import de.uka.ipd.sdq.pcm.repository.RepositoryPackage; |
21 | import de.uka.ipd.sdq.pcm.seff.SeffPackage; |
22 | |
23 | /** |
24 | * <!-- begin-user-doc --> |
25 | * An implementation of the model <b>Package</b>. |
26 | * <!-- end-user-doc --> |
27 | * @generated |
28 | */ |
29 | public class CompletionsPackageImpl extends EPackageImpl implements CompletionsPackage { |
30 | /** |
31 | * <!-- begin-user-doc --> |
32 | * <!-- end-user-doc --> |
33 | * @generated |
34 | */ |
35 | private EClass completionEClass = null; |
36 | |
37 | /** |
38 | * <!-- begin-user-doc --> |
39 | * <!-- end-user-doc --> |
40 | * @generated |
41 | */ |
42 | private EClass completionRepositoryEClass = null; |
43 | |
44 | /** |
45 | * <!-- begin-user-doc --> |
46 | * <!-- end-user-doc --> |
47 | * @generated |
48 | */ |
49 | private EClass delegatingExternalCallActionEClass = null; |
50 | |
51 | /** |
52 | * Creates an instance of the model <b>Package</b>, registered with |
53 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package |
54 | * package URI value. |
55 | * <p>Note: the correct way to create the package is via the static |
56 | * factory method {@link #init init()}, which also performs |
57 | * initialization of the package, or returns the registered package, |
58 | * if one already exists. |
59 | * <!-- begin-user-doc --> |
60 | * <!-- end-user-doc --> |
61 | * @see org.eclipse.emf.ecore.EPackage.Registry |
62 | * @see de.uka.ipd.sdq.completions.CompletionsPackage#eNS_URI |
63 | * @see #init() |
64 | * @generated |
65 | */ |
66 | private CompletionsPackageImpl() { |
67 | super(eNS_URI, CompletionsFactory.eINSTANCE); |
68 | } |
69 | |
70 | /** |
71 | * <!-- begin-user-doc --> |
72 | * <!-- end-user-doc --> |
73 | * @generated |
74 | */ |
75 | private static boolean isInited = false; |
76 | |
77 | /** |
78 | * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. |
79 | * |
80 | * <p>This method is used to initialize {@link CompletionsPackage#eINSTANCE} when that field is accessed. |
81 | * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. |
82 | * <!-- begin-user-doc --> |
83 | * <!-- end-user-doc --> |
84 | * @see #eNS_URI |
85 | * @see #createPackageContents() |
86 | * @see #initializePackageContents() |
87 | * @generated |
88 | */ |
89 | public static CompletionsPackage init() { |
90 | if (isInited) return (CompletionsPackage)EPackage.Registry.INSTANCE.getEPackage(CompletionsPackage.eNS_URI); |
91 | |
92 | // Obtain or create and register package |
93 | CompletionsPackageImpl theCompletionsPackage = (CompletionsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CompletionsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CompletionsPackageImpl()); |
94 | |
95 | isInited = true; |
96 | |
97 | // Initialize simple dependencies |
98 | PcmPackage.eINSTANCE.eClass(); |
99 | |
100 | // Create package meta-data objects |
101 | theCompletionsPackage.createPackageContents(); |
102 | |
103 | // Initialize created meta-data |
104 | theCompletionsPackage.initializePackageContents(); |
105 | |
106 | // Mark meta-data to indicate it can't be changed |
107 | theCompletionsPackage.freeze(); |
108 | |
109 | |
110 | // Update the registry and return the package |
111 | EPackage.Registry.INSTANCE.put(CompletionsPackage.eNS_URI, theCompletionsPackage); |
112 | return theCompletionsPackage; |
113 | } |
114 | |
115 | /** |
116 | * <!-- begin-user-doc --> |
117 | * <!-- end-user-doc --> |
118 | * @generated |
119 | */ |
120 | public EClass getCompletion() { |
121 | return completionEClass; |
122 | } |
123 | |
124 | /** |
125 | * <!-- begin-user-doc --> |
126 | * <!-- end-user-doc --> |
127 | * @generated |
128 | */ |
129 | public EClass getCompletionRepository() { |
130 | return completionRepositoryEClass; |
131 | } |
132 | |
133 | /** |
134 | * <!-- begin-user-doc --> |
135 | * <!-- end-user-doc --> |
136 | * @generated |
137 | */ |
138 | public EReference getCompletionRepository_Completions_CompletionRepository() { |
139 | return (EReference)completionRepositoryEClass.getEStructuralFeatures().get(0); |
140 | } |
141 | |
142 | /** |
143 | * <!-- begin-user-doc --> |
144 | * <!-- end-user-doc --> |
145 | * @generated |
146 | */ |
147 | public EClass getDelegatingExternalCallAction() { |
148 | return delegatingExternalCallActionEClass; |
149 | } |
150 | |
151 | /** |
152 | * <!-- begin-user-doc --> |
153 | * <!-- end-user-doc --> |
154 | * @generated |
155 | */ |
156 | public CompletionsFactory getCompletionsFactory() { |
157 | return (CompletionsFactory)getEFactoryInstance(); |
158 | } |
159 | |
160 | /** |
161 | * <!-- begin-user-doc --> |
162 | * <!-- end-user-doc --> |
163 | * @generated |
164 | */ |
165 | private boolean isCreated = false; |
166 | |
167 | /** |
168 | * Creates the meta-model objects for the package. This method is |
169 | * guarded to have no affect on any invocation but its first. |
170 | * <!-- begin-user-doc --> |
171 | * <!-- end-user-doc --> |
172 | * @generated |
173 | */ |
174 | public void createPackageContents() { |
175 | if (isCreated) return; |
176 | isCreated = true; |
177 | |
178 | // Create classes and their features |
179 | completionEClass = createEClass(COMPLETION); |
180 | |
181 | completionRepositoryEClass = createEClass(COMPLETION_REPOSITORY); |
182 | createEReference(completionRepositoryEClass, COMPLETION_REPOSITORY__COMPLETIONS_COMPLETION_REPOSITORY); |
183 | |
184 | delegatingExternalCallActionEClass = createEClass(DELEGATING_EXTERNAL_CALL_ACTION); |
185 | } |
186 | |
187 | /** |
188 | * <!-- begin-user-doc --> |
189 | * <!-- end-user-doc --> |
190 | * @generated |
191 | */ |
192 | private boolean isInitialized = false; |
193 | |
194 | /** |
195 | * Complete the initialization of the package and its meta-model. This |
196 | * method is guarded to have no affect on any invocation but its first. |
197 | * <!-- begin-user-doc --> |
198 | * <!-- end-user-doc --> |
199 | * @generated |
200 | */ |
201 | public void initializePackageContents() { |
202 | if (isInitialized) return; |
203 | isInitialized = true; |
204 | |
205 | // Initialize package |
206 | setName(eNAME); |
207 | setNsPrefix(eNS_PREFIX); |
208 | setNsURI(eNS_URI); |
209 | |
210 | // Obtain other dependent packages |
211 | EntityPackage theEntityPackage = (EntityPackage)EPackage.Registry.INSTANCE.getEPackage(EntityPackage.eNS_URI); |
212 | RepositoryPackage theRepositoryPackage = (RepositoryPackage)EPackage.Registry.INSTANCE.getEPackage(RepositoryPackage.eNS_URI); |
213 | SeffPackage theSeffPackage = (SeffPackage)EPackage.Registry.INSTANCE.getEPackage(SeffPackage.eNS_URI); |
214 | |
215 | // Create type parameters |
216 | |
217 | // Set bounds for type parameters |
218 | |
219 | // Add supertypes to classes |
220 | completionEClass.getESuperTypes().add(theEntityPackage.getComposedProvidingRequiringEntity()); |
221 | completionEClass.getESuperTypes().add(theRepositoryPackage.getImplementationComponentType()); |
222 | delegatingExternalCallActionEClass.getESuperTypes().add(theSeffPackage.getExternalCallAction()); |
223 | |
224 | // Initialize classes and features; add operations and parameters |
225 | initEClass(completionEClass, Completion.class, "Completion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
226 | |
227 | initEClass(completionRepositoryEClass, CompletionRepository.class, "CompletionRepository", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
228 | initEReference(getCompletionRepository_Completions_CompletionRepository(), this.getCompletion(), null, "completions_CompletionRepository", null, 0, -1, CompletionRepository.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); |
229 | |
230 | initEClass(delegatingExternalCallActionEClass, DelegatingExternalCallAction.class, "DelegatingExternalCallAction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
231 | |
232 | // Create resource |
233 | createResource(eNS_URI); |
234 | } |
235 | |
236 | } //CompletionsPackageImpl |