diff options
Diffstat (limited to 'Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/LinkedListPackageImpl.java')
-rw-r--r-- | Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/LinkedListPackageImpl.java | 239 |
1 files changed, 239 insertions, 0 deletions
diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/LinkedListPackageImpl.java b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/LinkedListPackageImpl.java new file mode 100644 index 00000000..f190c4d0 --- /dev/null +++ b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/LinkedListPackageImpl.java | |||
@@ -0,0 +1,239 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package linkedList.impl; | ||
4 | |||
5 | import linkedList.Element; | ||
6 | import linkedList.LinkedListFactory; | ||
7 | import linkedList.LinkedListPackage; | ||
8 | import linkedList.List; | ||
9 | import org.eclipse.emf.ecore.EClass; | ||
10 | import org.eclipse.emf.ecore.EPackage; | ||
11 | import org.eclipse.emf.ecore.EReference; | ||
12 | |||
13 | import org.eclipse.emf.ecore.impl.EPackageImpl; | ||
14 | |||
15 | /** | ||
16 | * <!-- begin-user-doc --> | ||
17 | * An implementation of the model <b>Package</b>. | ||
18 | * <!-- end-user-doc --> | ||
19 | * @generated | ||
20 | */ | ||
21 | public class LinkedListPackageImpl extends EPackageImpl implements LinkedListPackage { | ||
22 | /** | ||
23 | * <!-- begin-user-doc --> | ||
24 | * <!-- end-user-doc --> | ||
25 | * @generated | ||
26 | */ | ||
27 | private EClass listEClass = null; | ||
28 | |||
29 | /** | ||
30 | * <!-- begin-user-doc --> | ||
31 | * <!-- end-user-doc --> | ||
32 | * @generated | ||
33 | */ | ||
34 | private EClass elementEClass = null; | ||
35 | |||
36 | /** | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @generated | ||
40 | */ | ||
41 | private EClass objectEClass = null; | ||
42 | |||
43 | /** | ||
44 | * Creates an instance of the model <b>Package</b>, registered with | ||
45 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package | ||
46 | * package URI value. | ||
47 | * <p>Note: the correct way to create the package is via the static | ||
48 | * factory method {@link #init init()}, which also performs | ||
49 | * initialization of the package, or returns the registered package, | ||
50 | * if one already exists. | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @see org.eclipse.emf.ecore.EPackage.Registry | ||
54 | * @see linkedList.LinkedListPackage#eNS_URI | ||
55 | * @see #init() | ||
56 | * @generated | ||
57 | */ | ||
58 | private LinkedListPackageImpl() { | ||
59 | super(eNS_URI, LinkedListFactory.eINSTANCE); | ||
60 | } | ||
61 | |||
62 | /** | ||
63 | * <!-- begin-user-doc --> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @generated | ||
66 | */ | ||
67 | private static boolean isInited = false; | ||
68 | |||
69 | /** | ||
70 | * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. | ||
71 | * | ||
72 | * <p>This method is used to initialize {@link LinkedListPackage#eINSTANCE} when that field is accessed. | ||
73 | * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @see #eNS_URI | ||
77 | * @see #createPackageContents() | ||
78 | * @see #initializePackageContents() | ||
79 | * @generated | ||
80 | */ | ||
81 | public static LinkedListPackage init() { | ||
82 | if (isInited) return (LinkedListPackage)EPackage.Registry.INSTANCE.getEPackage(LinkedListPackage.eNS_URI); | ||
83 | |||
84 | // Obtain or create and register package | ||
85 | Object registeredLinkedListPackage = EPackage.Registry.INSTANCE.get(eNS_URI); | ||
86 | LinkedListPackageImpl theLinkedListPackage = registeredLinkedListPackage instanceof LinkedListPackageImpl ? (LinkedListPackageImpl)registeredLinkedListPackage : new LinkedListPackageImpl(); | ||
87 | |||
88 | isInited = true; | ||
89 | |||
90 | // Create package meta-data objects | ||
91 | theLinkedListPackage.createPackageContents(); | ||
92 | |||
93 | // Initialize created meta-data | ||
94 | theLinkedListPackage.initializePackageContents(); | ||
95 | |||
96 | // Mark meta-data to indicate it can't be changed | ||
97 | theLinkedListPackage.freeze(); | ||
98 | |||
99 | // Update the registry and return the package | ||
100 | EPackage.Registry.INSTANCE.put(LinkedListPackage.eNS_URI, theLinkedListPackage); | ||
101 | return theLinkedListPackage; | ||
102 | } | ||
103 | |||
104 | /** | ||
105 | * <!-- begin-user-doc --> | ||
106 | * <!-- end-user-doc --> | ||
107 | * @generated | ||
108 | */ | ||
109 | public EClass getList() { | ||
110 | return listEClass; | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * <!-- begin-user-doc --> | ||
115 | * <!-- end-user-doc --> | ||
116 | * @generated | ||
117 | */ | ||
118 | public EReference getList_First() { | ||
119 | return (EReference)listEClass.getEStructuralFeatures().get(0); | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | public EClass getElement() { | ||
128 | return elementEClass; | ||
129 | } | ||
130 | |||
131 | /** | ||
132 | * <!-- begin-user-doc --> | ||
133 | * <!-- end-user-doc --> | ||
134 | * @generated | ||
135 | */ | ||
136 | public EReference getElement_Value() { | ||
137 | return (EReference)elementEClass.getEStructuralFeatures().get(0); | ||
138 | } | ||
139 | |||
140 | /** | ||
141 | * <!-- begin-user-doc --> | ||
142 | * <!-- end-user-doc --> | ||
143 | * @generated | ||
144 | */ | ||
145 | public EReference getElement_Next() { | ||
146 | return (EReference)elementEClass.getEStructuralFeatures().get(1); | ||
147 | } | ||
148 | |||
149 | /** | ||
150 | * <!-- begin-user-doc --> | ||
151 | * <!-- end-user-doc --> | ||
152 | * @generated | ||
153 | */ | ||
154 | public EClass getObject() { | ||
155 | return objectEClass; | ||
156 | } | ||
157 | |||
158 | /** | ||
159 | * <!-- begin-user-doc --> | ||
160 | * <!-- end-user-doc --> | ||
161 | * @generated | ||
162 | */ | ||
163 | public LinkedListFactory getLinkedListFactory() { | ||
164 | return (LinkedListFactory)getEFactoryInstance(); | ||
165 | } | ||
166 | |||
167 | /** | ||
168 | * <!-- begin-user-doc --> | ||
169 | * <!-- end-user-doc --> | ||
170 | * @generated | ||
171 | */ | ||
172 | private boolean isCreated = false; | ||
173 | |||
174 | /** | ||
175 | * Creates the meta-model objects for the package. This method is | ||
176 | * guarded to have no affect on any invocation but its first. | ||
177 | * <!-- begin-user-doc --> | ||
178 | * <!-- end-user-doc --> | ||
179 | * @generated | ||
180 | */ | ||
181 | public void createPackageContents() { | ||
182 | if (isCreated) return; | ||
183 | isCreated = true; | ||
184 | |||
185 | // Create classes and their features | ||
186 | listEClass = createEClass(LIST); | ||
187 | createEReference(listEClass, LIST__FIRST); | ||
188 | |||
189 | elementEClass = createEClass(ELEMENT); | ||
190 | createEReference(elementEClass, ELEMENT__VALUE); | ||
191 | createEReference(elementEClass, ELEMENT__NEXT); | ||
192 | |||
193 | objectEClass = createEClass(OBJECT); | ||
194 | } | ||
195 | |||
196 | /** | ||
197 | * <!-- begin-user-doc --> | ||
198 | * <!-- end-user-doc --> | ||
199 | * @generated | ||
200 | */ | ||
201 | private boolean isInitialized = false; | ||
202 | |||
203 | /** | ||
204 | * Complete the initialization of the package and its meta-model. This | ||
205 | * method is guarded to have no affect on any invocation but its first. | ||
206 | * <!-- begin-user-doc --> | ||
207 | * <!-- end-user-doc --> | ||
208 | * @generated | ||
209 | */ | ||
210 | public void initializePackageContents() { | ||
211 | if (isInitialized) return; | ||
212 | isInitialized = true; | ||
213 | |||
214 | // Initialize package | ||
215 | setName(eNAME); | ||
216 | setNsPrefix(eNS_PREFIX); | ||
217 | setNsURI(eNS_URI); | ||
218 | |||
219 | // Create type parameters | ||
220 | |||
221 | // Set bounds for type parameters | ||
222 | |||
223 | // Add supertypes to classes | ||
224 | |||
225 | // Initialize classes, features, and operations; add parameters | ||
226 | initEClass(listEClass, List.class, "List", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
227 | initEReference(getList_First(), this.getElement(), null, "first", null, 0, 1, List.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
228 | |||
229 | initEClass(elementEClass, Element.class, "Element", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
230 | initEReference(getElement_Value(), this.getObject(), null, "value", null, 1, 1, Element.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
231 | initEReference(getElement_Next(), this.getElement(), null, "next", null, 0, 1, Element.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
232 | |||
233 | initEClass(objectEClass, linkedList.Object.class, "Object", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
234 | |||
235 | // Create resource | ||
236 | createResource(eNS_URI); | ||
237 | } | ||
238 | |||
239 | } //LinkedListPackageImpl | ||