diff options
Diffstat (limited to 'Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/LinkedListFactoryImpl.java')
-rw-r--r-- | Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/LinkedListFactoryImpl.java | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/LinkedListFactoryImpl.java b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/LinkedListFactoryImpl.java new file mode 100644 index 00000000..1a66a5e4 --- /dev/null +++ b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/LinkedListFactoryImpl.java | |||
@@ -0,0 +1,120 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package linkedList.impl; | ||
4 | |||
5 | import linkedList.Element; | ||
6 | import linkedList.LinkedListFactory; | ||
7 | import linkedList.LinkedListPackage; | ||
8 | import linkedList.List; | ||
9 | |||
10 | import org.eclipse.emf.ecore.EClass; | ||
11 | import org.eclipse.emf.ecore.EObject; | ||
12 | import org.eclipse.emf.ecore.EPackage; | ||
13 | |||
14 | import org.eclipse.emf.ecore.impl.EFactoryImpl; | ||
15 | |||
16 | import org.eclipse.emf.ecore.plugin.EcorePlugin; | ||
17 | |||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * An implementation of the model <b>Factory</b>. | ||
21 | * <!-- end-user-doc --> | ||
22 | * @generated | ||
23 | */ | ||
24 | public class LinkedListFactoryImpl extends EFactoryImpl implements LinkedListFactory { | ||
25 | /** | ||
26 | * Creates the default factory implementation. | ||
27 | * <!-- begin-user-doc --> | ||
28 | * <!-- end-user-doc --> | ||
29 | * @generated | ||
30 | */ | ||
31 | public static LinkedListFactory init() { | ||
32 | try { | ||
33 | LinkedListFactory theLinkedListFactory = (LinkedListFactory)EPackage.Registry.INSTANCE.getEFactory(LinkedListPackage.eNS_URI); | ||
34 | if (theLinkedListFactory != null) { | ||
35 | return theLinkedListFactory; | ||
36 | } | ||
37 | } | ||
38 | catch (Exception exception) { | ||
39 | EcorePlugin.INSTANCE.log(exception); | ||
40 | } | ||
41 | return new LinkedListFactoryImpl(); | ||
42 | } | ||
43 | |||
44 | /** | ||
45 | * Creates an instance of the factory. | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @generated | ||
49 | */ | ||
50 | public LinkedListFactoryImpl() { | ||
51 | super(); | ||
52 | } | ||
53 | |||
54 | /** | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @generated | ||
58 | */ | ||
59 | @Override | ||
60 | public EObject create(EClass eClass) { | ||
61 | switch (eClass.getClassifierID()) { | ||
62 | case LinkedListPackage.LIST: return createList(); | ||
63 | case LinkedListPackage.ELEMENT: return createElement(); | ||
64 | case LinkedListPackage.OBJECT: return createObject(); | ||
65 | default: | ||
66 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | ||
67 | } | ||
68 | } | ||
69 | |||
70 | /** | ||
71 | * <!-- begin-user-doc --> | ||
72 | * <!-- end-user-doc --> | ||
73 | * @generated | ||
74 | */ | ||
75 | public List createList() { | ||
76 | ListImpl list = new ListImpl(); | ||
77 | return list; | ||
78 | } | ||
79 | |||
80 | /** | ||
81 | * <!-- begin-user-doc --> | ||
82 | * <!-- end-user-doc --> | ||
83 | * @generated | ||
84 | */ | ||
85 | public Element createElement() { | ||
86 | ElementImpl element = new ElementImpl(); | ||
87 | return element; | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * <!-- begin-user-doc --> | ||
92 | * <!-- end-user-doc --> | ||
93 | * @generated | ||
94 | */ | ||
95 | public linkedList.Object createObject() { | ||
96 | ObjectImpl object = new ObjectImpl(); | ||
97 | return object; | ||
98 | } | ||
99 | |||
100 | /** | ||
101 | * <!-- begin-user-doc --> | ||
102 | * <!-- end-user-doc --> | ||
103 | * @generated | ||
104 | */ | ||
105 | public LinkedListPackage getLinkedListPackage() { | ||
106 | return (LinkedListPackage)getEPackage(); | ||
107 | } | ||
108 | |||
109 | /** | ||
110 | * <!-- begin-user-doc --> | ||
111 | * <!-- end-user-doc --> | ||
112 | * @deprecated | ||
113 | * @generated | ||
114 | */ | ||
115 | @Deprecated | ||
116 | public static LinkedListPackage getPackage() { | ||
117 | return LinkedListPackage.eINSTANCE; | ||
118 | } | ||
119 | |||
120 | } //LinkedListFactoryImpl | ||