1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package QVTBase.util; |
8 | |
9 | import EMOF.Element; |
10 | import EMOF.MultiplicityElement; |
11 | import EMOF.NamedElement; |
12 | import EMOF.Operation; |
13 | import EMOF.Parameter; |
14 | import EMOF.Type; |
15 | import EMOF.TypedElement; |
16 | |
17 | import EssentialOCL.Variable; |
18 | |
19 | import QVTBase.*; |
20 | |
21 | import org.eclipse.emf.common.notify.Adapter; |
22 | import org.eclipse.emf.common.notify.Notifier; |
23 | |
24 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; |
25 | |
26 | import org.eclipse.emf.ecore.EObject; |
27 | |
28 | /** |
29 | * <!-- begin-user-doc --> |
30 | * The <b>Adapter Factory</b> for the model. |
31 | * It provides an adapter <code>createXXX</code> method for each class of the model. |
32 | * <!-- end-user-doc --> |
33 | * @see QVTBase.QVTBasePackage |
34 | * @generated |
35 | */ |
36 | public class QVTBaseAdapterFactory extends AdapterFactoryImpl { |
37 | /** |
38 | * The cached model package. |
39 | * <!-- begin-user-doc --> |
40 | * <!-- end-user-doc --> |
41 | * @generated |
42 | */ |
43 | protected static QVTBasePackage modelPackage; |
44 | |
45 | /** |
46 | * Creates an instance of the adapter factory. |
47 | * <!-- begin-user-doc --> |
48 | * <!-- end-user-doc --> |
49 | * @generated |
50 | */ |
51 | public QVTBaseAdapterFactory() { |
52 | if (modelPackage == null) { |
53 | modelPackage = QVTBasePackage.eINSTANCE; |
54 | } |
55 | } |
56 | |
57 | /** |
58 | * Returns whether this factory is applicable for the type of the object. |
59 | * <!-- begin-user-doc --> |
60 | * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. |
61 | * <!-- end-user-doc --> |
62 | * @return whether this factory is applicable for the type of the object. |
63 | * @generated |
64 | */ |
65 | @Override |
66 | public boolean isFactoryForType(Object object) { |
67 | if (object == modelPackage) { |
68 | return true; |
69 | } |
70 | if (object instanceof EObject) { |
71 | return ((EObject)object).eClass().getEPackage() == modelPackage; |
72 | } |
73 | return false; |
74 | } |
75 | |
76 | /** |
77 | * The switch that delegates to the <code>createXXX</code> methods. |
78 | * <!-- begin-user-doc --> |
79 | * <!-- end-user-doc --> |
80 | * @generated |
81 | */ |
82 | protected QVTBaseSwitch<Adapter> modelSwitch = |
83 | new QVTBaseSwitch<Adapter>() { |
84 | @Override |
85 | public Adapter caseDomain(Domain object) { |
86 | return createDomainAdapter(); |
87 | } |
88 | @Override |
89 | public Adapter caseFunction(Function object) { |
90 | return createFunctionAdapter(); |
91 | } |
92 | @Override |
93 | public Adapter caseFunctionParameter(FunctionParameter object) { |
94 | return createFunctionParameterAdapter(); |
95 | } |
96 | @Override |
97 | public Adapter casePattern(Pattern object) { |
98 | return createPatternAdapter(); |
99 | } |
100 | @Override |
101 | public Adapter casePredicate(Predicate object) { |
102 | return createPredicateAdapter(); |
103 | } |
104 | @Override |
105 | public Adapter caseRule(Rule object) { |
106 | return createRuleAdapter(); |
107 | } |
108 | @Override |
109 | public Adapter caseTransformation(Transformation object) { |
110 | return createTransformationAdapter(); |
111 | } |
112 | @Override |
113 | public Adapter caseTypedModel(TypedModel object) { |
114 | return createTypedModelAdapter(); |
115 | } |
116 | @Override |
117 | public Adapter caseObject(EMOF.Object object) { |
118 | return createObjectAdapter(); |
119 | } |
120 | @Override |
121 | public Adapter caseElement(Element object) { |
122 | return createElementAdapter(); |
123 | } |
124 | @Override |
125 | public Adapter caseNamedElement(NamedElement object) { |
126 | return createNamedElementAdapter(); |
127 | } |
128 | @Override |
129 | public Adapter caseTypedElement(TypedElement object) { |
130 | return createTypedElementAdapter(); |
131 | } |
132 | @Override |
133 | public Adapter caseMultiplicityElement(MultiplicityElement object) { |
134 | return createMultiplicityElementAdapter(); |
135 | } |
136 | @Override |
137 | public Adapter caseOperation(Operation object) { |
138 | return createOperationAdapter(); |
139 | } |
140 | @Override |
141 | public Adapter caseVariable(Variable object) { |
142 | return createVariableAdapter(); |
143 | } |
144 | @Override |
145 | public Adapter caseParameter(Parameter object) { |
146 | return createParameterAdapter(); |
147 | } |
148 | @Override |
149 | public Adapter caseType(Type object) { |
150 | return createTypeAdapter(); |
151 | } |
152 | @Override |
153 | public Adapter caseClass(EMOF.Class object) { |
154 | return createClassAdapter(); |
155 | } |
156 | @Override |
157 | public Adapter casePackage(EMOF.Package object) { |
158 | return createPackageAdapter(); |
159 | } |
160 | @Override |
161 | public Adapter defaultCase(EObject object) { |
162 | return createEObjectAdapter(); |
163 | } |
164 | }; |
165 | |
166 | /** |
167 | * Creates an adapter for the <code>target</code>. |
168 | * <!-- begin-user-doc --> |
169 | * <!-- end-user-doc --> |
170 | * @param target the object to adapt. |
171 | * @return the adapter for the <code>target</code>. |
172 | * @generated |
173 | */ |
174 | @Override |
175 | public Adapter createAdapter(Notifier target) { |
176 | return modelSwitch.doSwitch((EObject)target); |
177 | } |
178 | |
179 | |
180 | /** |
181 | * Creates a new adapter for an object of class '{@link QVTBase.Domain <em>Domain</em>}'. |
182 | * <!-- begin-user-doc --> |
183 | * This default implementation returns null so that we can easily ignore cases; |
184 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
185 | * <!-- end-user-doc --> |
186 | * @return the new adapter. |
187 | * @see QVTBase.Domain |
188 | * @generated |
189 | */ |
190 | public Adapter createDomainAdapter() { |
191 | return null; |
192 | } |
193 | |
194 | /** |
195 | * Creates a new adapter for an object of class '{@link QVTBase.Function <em>Function</em>}'. |
196 | * <!-- begin-user-doc --> |
197 | * This default implementation returns null so that we can easily ignore cases; |
198 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
199 | * <!-- end-user-doc --> |
200 | * @return the new adapter. |
201 | * @see QVTBase.Function |
202 | * @generated |
203 | */ |
204 | public Adapter createFunctionAdapter() { |
205 | return null; |
206 | } |
207 | |
208 | /** |
209 | * Creates a new adapter for an object of class '{@link QVTBase.FunctionParameter <em>Function Parameter</em>}'. |
210 | * <!-- begin-user-doc --> |
211 | * This default implementation returns null so that we can easily ignore cases; |
212 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
213 | * <!-- end-user-doc --> |
214 | * @return the new adapter. |
215 | * @see QVTBase.FunctionParameter |
216 | * @generated |
217 | */ |
218 | public Adapter createFunctionParameterAdapter() { |
219 | return null; |
220 | } |
221 | |
222 | /** |
223 | * Creates a new adapter for an object of class '{@link QVTBase.Pattern <em>Pattern</em>}'. |
224 | * <!-- begin-user-doc --> |
225 | * This default implementation returns null so that we can easily ignore cases; |
226 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
227 | * <!-- end-user-doc --> |
228 | * @return the new adapter. |
229 | * @see QVTBase.Pattern |
230 | * @generated |
231 | */ |
232 | public Adapter createPatternAdapter() { |
233 | return null; |
234 | } |
235 | |
236 | /** |
237 | * Creates a new adapter for an object of class '{@link QVTBase.Predicate <em>Predicate</em>}'. |
238 | * <!-- begin-user-doc --> |
239 | * This default implementation returns null so that we can easily ignore cases; |
240 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
241 | * <!-- end-user-doc --> |
242 | * @return the new adapter. |
243 | * @see QVTBase.Predicate |
244 | * @generated |
245 | */ |
246 | public Adapter createPredicateAdapter() { |
247 | return null; |
248 | } |
249 | |
250 | /** |
251 | * Creates a new adapter for an object of class '{@link QVTBase.Rule <em>Rule</em>}'. |
252 | * <!-- begin-user-doc --> |
253 | * This default implementation returns null so that we can easily ignore cases; |
254 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
255 | * <!-- end-user-doc --> |
256 | * @return the new adapter. |
257 | * @see QVTBase.Rule |
258 | * @generated |
259 | */ |
260 | public Adapter createRuleAdapter() { |
261 | return null; |
262 | } |
263 | |
264 | /** |
265 | * Creates a new adapter for an object of class '{@link QVTBase.Transformation <em>Transformation</em>}'. |
266 | * <!-- begin-user-doc --> |
267 | * This default implementation returns null so that we can easily ignore cases; |
268 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
269 | * <!-- end-user-doc --> |
270 | * @return the new adapter. |
271 | * @see QVTBase.Transformation |
272 | * @generated |
273 | */ |
274 | public Adapter createTransformationAdapter() { |
275 | return null; |
276 | } |
277 | |
278 | /** |
279 | * Creates a new adapter for an object of class '{@link QVTBase.TypedModel <em>Typed Model</em>}'. |
280 | * <!-- begin-user-doc --> |
281 | * This default implementation returns null so that we can easily ignore cases; |
282 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
283 | * <!-- end-user-doc --> |
284 | * @return the new adapter. |
285 | * @see QVTBase.TypedModel |
286 | * @generated |
287 | */ |
288 | public Adapter createTypedModelAdapter() { |
289 | return null; |
290 | } |
291 | |
292 | /** |
293 | * Creates a new adapter for an object of class '{@link EMOF.Object <em>Object</em>}'. |
294 | * <!-- begin-user-doc --> |
295 | * This default implementation returns null so that we can easily ignore cases; |
296 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
297 | * <!-- end-user-doc --> |
298 | * @return the new adapter. |
299 | * @see EMOF.Object |
300 | * @generated |
301 | */ |
302 | public Adapter createObjectAdapter() { |
303 | return null; |
304 | } |
305 | |
306 | /** |
307 | * Creates a new adapter for an object of class '{@link EMOF.Element <em>Element</em>}'. |
308 | * <!-- begin-user-doc --> |
309 | * This default implementation returns null so that we can easily ignore cases; |
310 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
311 | * <!-- end-user-doc --> |
312 | * @return the new adapter. |
313 | * @see EMOF.Element |
314 | * @generated |
315 | */ |
316 | public Adapter createElementAdapter() { |
317 | return null; |
318 | } |
319 | |
320 | /** |
321 | * Creates a new adapter for an object of class '{@link EMOF.NamedElement <em>Named Element</em>}'. |
322 | * <!-- begin-user-doc --> |
323 | * This default implementation returns null so that we can easily ignore cases; |
324 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
325 | * <!-- end-user-doc --> |
326 | * @return the new adapter. |
327 | * @see EMOF.NamedElement |
328 | * @generated |
329 | */ |
330 | public Adapter createNamedElementAdapter() { |
331 | return null; |
332 | } |
333 | |
334 | /** |
335 | * Creates a new adapter for an object of class '{@link EMOF.TypedElement <em>Typed Element</em>}'. |
336 | * <!-- begin-user-doc --> |
337 | * This default implementation returns null so that we can easily ignore cases; |
338 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
339 | * <!-- end-user-doc --> |
340 | * @return the new adapter. |
341 | * @see EMOF.TypedElement |
342 | * @generated |
343 | */ |
344 | public Adapter createTypedElementAdapter() { |
345 | return null; |
346 | } |
347 | |
348 | /** |
349 | * Creates a new adapter for an object of class '{@link EMOF.MultiplicityElement <em>Multiplicity Element</em>}'. |
350 | * <!-- begin-user-doc --> |
351 | * This default implementation returns null so that we can easily ignore cases; |
352 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
353 | * <!-- end-user-doc --> |
354 | * @return the new adapter. |
355 | * @see EMOF.MultiplicityElement |
356 | * @generated |
357 | */ |
358 | public Adapter createMultiplicityElementAdapter() { |
359 | return null; |
360 | } |
361 | |
362 | /** |
363 | * Creates a new adapter for an object of class '{@link EMOF.Operation <em>Operation</em>}'. |
364 | * <!-- begin-user-doc --> |
365 | * This default implementation returns null so that we can easily ignore cases; |
366 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
367 | * <!-- end-user-doc --> |
368 | * @return the new adapter. |
369 | * @see EMOF.Operation |
370 | * @generated |
371 | */ |
372 | public Adapter createOperationAdapter() { |
373 | return null; |
374 | } |
375 | |
376 | /** |
377 | * Creates a new adapter for an object of class '{@link EssentialOCL.Variable <em>Variable</em>}'. |
378 | * <!-- begin-user-doc --> |
379 | * This default implementation returns null so that we can easily ignore cases; |
380 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
381 | * <!-- end-user-doc --> |
382 | * @return the new adapter. |
383 | * @see EssentialOCL.Variable |
384 | * @generated |
385 | */ |
386 | public Adapter createVariableAdapter() { |
387 | return null; |
388 | } |
389 | |
390 | /** |
391 | * Creates a new adapter for an object of class '{@link EMOF.Parameter <em>Parameter</em>}'. |
392 | * <!-- begin-user-doc --> |
393 | * This default implementation returns null so that we can easily ignore cases; |
394 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
395 | * <!-- end-user-doc --> |
396 | * @return the new adapter. |
397 | * @see EMOF.Parameter |
398 | * @generated |
399 | */ |
400 | public Adapter createParameterAdapter() { |
401 | return null; |
402 | } |
403 | |
404 | /** |
405 | * Creates a new adapter for an object of class '{@link EMOF.Type <em>Type</em>}'. |
406 | * <!-- begin-user-doc --> |
407 | * This default implementation returns null so that we can easily ignore cases; |
408 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
409 | * <!-- end-user-doc --> |
410 | * @return the new adapter. |
411 | * @see EMOF.Type |
412 | * @generated |
413 | */ |
414 | public Adapter createTypeAdapter() { |
415 | return null; |
416 | } |
417 | |
418 | /** |
419 | * Creates a new adapter for an object of class '{@link EMOF.Class <em>Class</em>}'. |
420 | * <!-- begin-user-doc --> |
421 | * This default implementation returns null so that we can easily ignore cases; |
422 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
423 | * <!-- end-user-doc --> |
424 | * @return the new adapter. |
425 | * @see EMOF.Class |
426 | * @generated |
427 | */ |
428 | public Adapter createClassAdapter() { |
429 | return null; |
430 | } |
431 | |
432 | /** |
433 | * Creates a new adapter for an object of class '{@link EMOF.Package <em>Package</em>}'. |
434 | * <!-- begin-user-doc --> |
435 | * This default implementation returns null so that we can easily ignore cases; |
436 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
437 | * <!-- end-user-doc --> |
438 | * @return the new adapter. |
439 | * @see EMOF.Package |
440 | * @generated |
441 | */ |
442 | public Adapter createPackageAdapter() { |
443 | return null; |
444 | } |
445 | |
446 | /** |
447 | * Creates a new adapter for the default case. |
448 | * <!-- begin-user-doc --> |
449 | * This default implementation returns null. |
450 | * <!-- end-user-doc --> |
451 | * @return the new adapter. |
452 | * @generated |
453 | */ |
454 | public Adapter createEObjectAdapter() { |
455 | return null; |
456 | } |
457 | |
458 | } //QVTBaseAdapterFactory |