/
StandardFactoryImpl.java
514 lines (471 loc) · 11.9 KB
/
StandardFactoryImpl.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
/*
* Copyright (c) 2014, 2018 CEA and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* Kenn Hussey (CEA) - initial API and implementation
* Kenn Hussey - 535301
*
*/
package org.eclipse.uml2.uml.profile.standard.internal.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.uml2.uml.profile.standard.Auxiliary;
import org.eclipse.uml2.uml.profile.standard.BuildComponent;
import org.eclipse.uml2.uml.profile.standard.Call;
import org.eclipse.uml2.uml.profile.standard.Create;
import org.eclipse.uml2.uml.profile.standard.Derive;
import org.eclipse.uml2.uml.profile.standard.Destroy;
import org.eclipse.uml2.uml.profile.standard.Document;
import org.eclipse.uml2.uml.profile.standard.Entity;
import org.eclipse.uml2.uml.profile.standard.Executable;
import org.eclipse.uml2.uml.profile.standard.Focus;
import org.eclipse.uml2.uml.profile.standard.Framework;
import org.eclipse.uml2.uml.profile.standard.Implement;
import org.eclipse.uml2.uml.profile.standard.ImplementationClass;
import org.eclipse.uml2.uml.profile.standard.Instantiate;
import org.eclipse.uml2.uml.profile.standard.Library;
import org.eclipse.uml2.uml.profile.standard.Metaclass;
import org.eclipse.uml2.uml.profile.standard.Metamodel;
import org.eclipse.uml2.uml.profile.standard.ModelLibrary;
import org.eclipse.uml2.uml.profile.standard.Realization;
import org.eclipse.uml2.uml.profile.standard.Refine;
import org.eclipse.uml2.uml.profile.standard.Responsibility;
import org.eclipse.uml2.uml.profile.standard.Script;
import org.eclipse.uml2.uml.profile.standard.Send;
import org.eclipse.uml2.uml.profile.standard.Service;
import org.eclipse.uml2.uml.profile.standard.Source;
import org.eclipse.uml2.uml.profile.standard.Specification;
import org.eclipse.uml2.uml.profile.standard.StandardFactory;
import org.eclipse.uml2.uml.profile.standard.StandardPackage;
import org.eclipse.uml2.uml.profile.standard.Subsystem;
import org.eclipse.uml2.uml.profile.standard.SystemModel;
import org.eclipse.uml2.uml.profile.standard.Trace;
import org.eclipse.uml2.uml.profile.standard.Type;
import org.eclipse.uml2.uml.profile.standard.Utility;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class StandardFactoryImpl
extends EFactoryImpl
implements StandardFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static StandardFactory init() {
try {
StandardFactory theStandardFactory = (StandardFactory) EPackage.Registry.INSTANCE
.getEFactory(StandardPackage.eNS_URI);
if (theStandardFactory != null) {
return theStandardFactory;
}
} catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new StandardFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public StandardFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case StandardPackage.AUXILIARY :
return createAuxiliary();
case StandardPackage.CALL :
return createCall();
case StandardPackage.CREATE :
return createCreate();
case StandardPackage.DERIVE :
return createDerive();
case StandardPackage.DESTROY :
return createDestroy();
case StandardPackage.DOCUMENT :
return createDocument();
case StandardPackage.ENTITY :
return createEntity();
case StandardPackage.EXECUTABLE :
return createExecutable();
case StandardPackage.FOCUS :
return createFocus();
case StandardPackage.FRAMEWORK :
return createFramework();
case StandardPackage.IMPLEMENT :
return createImplement();
case StandardPackage.IMPLEMENTATION_CLASS :
return createImplementationClass();
case StandardPackage.INSTANTIATE :
return createInstantiate();
case StandardPackage.LIBRARY :
return createLibrary();
case StandardPackage.METACLASS :
return createMetaclass();
case StandardPackage.MODEL_LIBRARY :
return createModelLibrary();
case StandardPackage.PROCESS :
return createProcess();
case StandardPackage.REALIZATION :
return createRealization();
case StandardPackage.REFINE :
return createRefine();
case StandardPackage.RESPONSIBILITY :
return createResponsibility();
case StandardPackage.SCRIPT :
return createScript();
case StandardPackage.SEND :
return createSend();
case StandardPackage.SERVICE :
return createService();
case StandardPackage.SOURCE :
return createSource();
case StandardPackage.SPECIFICATION :
return createSpecification();
case StandardPackage.SUBSYSTEM :
return createSubsystem();
case StandardPackage.TRACE :
return createTrace();
case StandardPackage.TYPE :
return createType();
case StandardPackage.UTILITY :
return createUtility();
case StandardPackage.BUILD_COMPONENT :
return createBuildComponent();
case StandardPackage.METAMODEL :
return createMetamodel();
case StandardPackage.SYSTEM_MODEL :
return createSystemModel();
default :
throw new IllegalArgumentException("The class '" //$NON-NLS-1$
+ eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Auxiliary createAuxiliary() {
AuxiliaryImpl auxiliary = new AuxiliaryImpl();
return auxiliary;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Call createCall() {
CallImpl call = new CallImpl();
return call;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Create createCreate() {
CreateImpl create = new CreateImpl();
return create;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Derive createDerive() {
DeriveImpl derive = new DeriveImpl();
return derive;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Destroy createDestroy() {
DestroyImpl destroy = new DestroyImpl();
return destroy;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Document createDocument() {
DocumentImpl document = new DocumentImpl();
return document;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Entity createEntity() {
EntityImpl entity = new EntityImpl();
return entity;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Executable createExecutable() {
ExecutableImpl executable = new ExecutableImpl();
return executable;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Focus createFocus() {
FocusImpl focus = new FocusImpl();
return focus;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Framework createFramework() {
FrameworkImpl framework = new FrameworkImpl();
return framework;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Implement createImplement() {
ImplementImpl implement = new ImplementImpl();
return implement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ImplementationClass createImplementationClass() {
ImplementationClassImpl implementationClass = new ImplementationClassImpl();
return implementationClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Instantiate createInstantiate() {
InstantiateImpl instantiate = new InstantiateImpl();
return instantiate;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Library createLibrary() {
LibraryImpl library = new LibraryImpl();
return library;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Metaclass createMetaclass() {
MetaclassImpl metaclass = new MetaclassImpl();
return metaclass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ModelLibrary createModelLibrary() {
ModelLibraryImpl modelLibrary = new ModelLibraryImpl();
return modelLibrary;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.uml2.uml.profile.standard.Process createProcess() {
ProcessImpl process = new ProcessImpl();
return process;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Realization createRealization() {
RealizationImpl realization = new RealizationImpl();
return realization;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Refine createRefine() {
RefineImpl refine = new RefineImpl();
return refine;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Responsibility createResponsibility() {
ResponsibilityImpl responsibility = new ResponsibilityImpl();
return responsibility;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Script createScript() {
ScriptImpl script = new ScriptImpl();
return script;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Send createSend() {
SendImpl send = new SendImpl();
return send;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Service createService() {
ServiceImpl service = new ServiceImpl();
return service;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Source createSource() {
SourceImpl source = new SourceImpl();
return source;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Specification createSpecification() {
SpecificationImpl specification = new SpecificationImpl();
return specification;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Subsystem createSubsystem() {
SubsystemImpl subsystem = new SubsystemImpl();
return subsystem;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Trace createTrace() {
TraceImpl trace = new TraceImpl();
return trace;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Type createType() {
TypeImpl type = new TypeImpl();
return type;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Utility createUtility() {
UtilityImpl utility = new UtilityImpl();
return utility;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BuildComponent createBuildComponent() {
BuildComponentImpl buildComponent = new BuildComponentImpl();
return buildComponent;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Metamodel createMetamodel() {
MetamodelImpl metamodel = new MetamodelImpl();
return metamodel;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SystemModel createSystemModel() {
SystemModelImpl systemModel = new SystemModelImpl();
return systemModel;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public StandardPackage getStandardPackage() {
return (StandardPackage) getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static StandardPackage getPackage() {
return StandardPackage.eINSTANCE;
}
} //StandardFactoryImpl