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