diff options
author | 2020-05-19 21:18:06 +0200 | |
---|---|---|
committer | 2020-05-19 21:18:06 +0200 | |
commit | b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b (patch) | |
tree | ad3222182065b8fac7d9b3d528c4efabf2aa0dd2 /Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/MetricDefinitionImpl.java | |
parent | Merge branch 'master' of github.com:viatra/VIATRA-Generator (diff) | |
download | VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.tar.gz VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.tar.zst VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.zip |
Config language WIP
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/MetricDefinitionImpl.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/MetricDefinitionImpl.java | 309 |
1 files changed, 309 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/MetricDefinitionImpl.java b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/MetricDefinitionImpl.java new file mode 100644 index 00000000..d441b8c1 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/MetricDefinitionImpl.java | |||
@@ -0,0 +1,309 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.21.0 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.solverLanguage.impl; | ||
5 | |||
6 | import org.eclipse.emf.common.notify.Notification; | ||
7 | import org.eclipse.emf.common.notify.NotificationChain; | ||
8 | |||
9 | import org.eclipse.emf.ecore.EClass; | ||
10 | import org.eclipse.emf.ecore.InternalEObject; | ||
11 | |||
12 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
13 | |||
14 | import org.eclipse.viatra.solver.language.solverLanguage.Expression; | ||
15 | import org.eclipse.viatra.solver.language.solverLanguage.MetricDefinition; | ||
16 | import org.eclipse.viatra.solver.language.solverLanguage.NamedElement; | ||
17 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | ||
18 | |||
19 | /** | ||
20 | * <!-- begin-user-doc --> | ||
21 | * An implementation of the model object '<em><b>Metric Definition</b></em>'. | ||
22 | * <!-- end-user-doc --> | ||
23 | * <p> | ||
24 | * The following features are implemented: | ||
25 | * </p> | ||
26 | * <ul> | ||
27 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.MetricDefinitionImpl#getHead <em>Head</em>}</li> | ||
28 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.MetricDefinitionImpl#getBody <em>Body</em>}</li> | ||
29 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.MetricDefinitionImpl#getType <em>Type</em>}</li> | ||
30 | * </ul> | ||
31 | * | ||
32 | * @generated | ||
33 | */ | ||
34 | public class MetricDefinitionImpl extends StatementImpl implements MetricDefinition { | ||
35 | /** | ||
36 | * The cached value of the '{@link #getHead() <em>Head</em>}' containment reference. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @see #getHead() | ||
40 | * @generated | ||
41 | * @ordered | ||
42 | */ | ||
43 | protected Expression head; | ||
44 | |||
45 | /** | ||
46 | * The cached value of the '{@link #getBody() <em>Body</em>}' containment reference. | ||
47 | * <!-- begin-user-doc --> | ||
48 | * <!-- end-user-doc --> | ||
49 | * @see #getBody() | ||
50 | * @generated | ||
51 | * @ordered | ||
52 | */ | ||
53 | protected Expression body; | ||
54 | |||
55 | /** | ||
56 | * The cached value of the '{@link #getType() <em>Type</em>}' reference. | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @see #getType() | ||
60 | * @generated | ||
61 | * @ordered | ||
62 | */ | ||
63 | protected NamedElement type; | ||
64 | |||
65 | /** | ||
66 | * <!-- begin-user-doc --> | ||
67 | * <!-- end-user-doc --> | ||
68 | * @generated | ||
69 | */ | ||
70 | protected MetricDefinitionImpl() { | ||
71 | super(); | ||
72 | } | ||
73 | |||
74 | /** | ||
75 | * <!-- begin-user-doc --> | ||
76 | * <!-- end-user-doc --> | ||
77 | * @generated | ||
78 | */ | ||
79 | @Override | ||
80 | protected EClass eStaticClass() { | ||
81 | return SolverLanguagePackage.Literals.METRIC_DEFINITION; | ||
82 | } | ||
83 | |||
84 | /** | ||
85 | * <!-- begin-user-doc --> | ||
86 | * <!-- end-user-doc --> | ||
87 | * @generated | ||
88 | */ | ||
89 | @Override | ||
90 | public Expression getHead() { | ||
91 | return head; | ||
92 | } | ||
93 | |||
94 | /** | ||
95 | * <!-- begin-user-doc --> | ||
96 | * <!-- end-user-doc --> | ||
97 | * @generated | ||
98 | */ | ||
99 | public NotificationChain basicSetHead(Expression newHead, NotificationChain msgs) { | ||
100 | Expression oldHead = head; | ||
101 | head = newHead; | ||
102 | if (eNotificationRequired()) { | ||
103 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.METRIC_DEFINITION__HEAD, oldHead, newHead); | ||
104 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
105 | } | ||
106 | return msgs; | ||
107 | } | ||
108 | |||
109 | /** | ||
110 | * <!-- begin-user-doc --> | ||
111 | * <!-- end-user-doc --> | ||
112 | * @generated | ||
113 | */ | ||
114 | @Override | ||
115 | public void setHead(Expression newHead) { | ||
116 | if (newHead != head) { | ||
117 | NotificationChain msgs = null; | ||
118 | if (head != null) | ||
119 | msgs = ((InternalEObject)head).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.METRIC_DEFINITION__HEAD, null, msgs); | ||
120 | if (newHead != null) | ||
121 | msgs = ((InternalEObject)newHead).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.METRIC_DEFINITION__HEAD, null, msgs); | ||
122 | msgs = basicSetHead(newHead, msgs); | ||
123 | if (msgs != null) msgs.dispatch(); | ||
124 | } | ||
125 | else if (eNotificationRequired()) | ||
126 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.METRIC_DEFINITION__HEAD, newHead, newHead)); | ||
127 | } | ||
128 | |||
129 | /** | ||
130 | * <!-- begin-user-doc --> | ||
131 | * <!-- end-user-doc --> | ||
132 | * @generated | ||
133 | */ | ||
134 | @Override | ||
135 | public Expression getBody() { | ||
136 | return body; | ||
137 | } | ||
138 | |||
139 | /** | ||
140 | * <!-- begin-user-doc --> | ||
141 | * <!-- end-user-doc --> | ||
142 | * @generated | ||
143 | */ | ||
144 | public NotificationChain basicSetBody(Expression newBody, NotificationChain msgs) { | ||
145 | Expression oldBody = body; | ||
146 | body = newBody; | ||
147 | if (eNotificationRequired()) { | ||
148 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.METRIC_DEFINITION__BODY, oldBody, newBody); | ||
149 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
150 | } | ||
151 | return msgs; | ||
152 | } | ||
153 | |||
154 | /** | ||
155 | * <!-- begin-user-doc --> | ||
156 | * <!-- end-user-doc --> | ||
157 | * @generated | ||
158 | */ | ||
159 | @Override | ||
160 | public void setBody(Expression newBody) { | ||
161 | if (newBody != body) { | ||
162 | NotificationChain msgs = null; | ||
163 | if (body != null) | ||
164 | msgs = ((InternalEObject)body).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.METRIC_DEFINITION__BODY, null, msgs); | ||
165 | if (newBody != null) | ||
166 | msgs = ((InternalEObject)newBody).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.METRIC_DEFINITION__BODY, null, msgs); | ||
167 | msgs = basicSetBody(newBody, msgs); | ||
168 | if (msgs != null) msgs.dispatch(); | ||
169 | } | ||
170 | else if (eNotificationRequired()) | ||
171 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.METRIC_DEFINITION__BODY, newBody, newBody)); | ||
172 | } | ||
173 | |||
174 | /** | ||
175 | * <!-- begin-user-doc --> | ||
176 | * <!-- end-user-doc --> | ||
177 | * @generated | ||
178 | */ | ||
179 | @Override | ||
180 | public NamedElement getType() { | ||
181 | if (type != null && type.eIsProxy()) { | ||
182 | InternalEObject oldType = (InternalEObject)type; | ||
183 | type = (NamedElement)eResolveProxy(oldType); | ||
184 | if (type != oldType) { | ||
185 | if (eNotificationRequired()) | ||
186 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, SolverLanguagePackage.METRIC_DEFINITION__TYPE, oldType, type)); | ||
187 | } | ||
188 | } | ||
189 | return type; | ||
190 | } | ||
191 | |||
192 | /** | ||
193 | * <!-- begin-user-doc --> | ||
194 | * <!-- end-user-doc --> | ||
195 | * @generated | ||
196 | */ | ||
197 | public NamedElement basicGetType() { | ||
198 | return type; | ||
199 | } | ||
200 | |||
201 | /** | ||
202 | * <!-- begin-user-doc --> | ||
203 | * <!-- end-user-doc --> | ||
204 | * @generated | ||
205 | */ | ||
206 | @Override | ||
207 | public void setType(NamedElement newType) { | ||
208 | NamedElement oldType = type; | ||
209 | type = newType; | ||
210 | if (eNotificationRequired()) | ||
211 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.METRIC_DEFINITION__TYPE, oldType, type)); | ||
212 | } | ||
213 | |||
214 | /** | ||
215 | * <!-- begin-user-doc --> | ||
216 | * <!-- end-user-doc --> | ||
217 | * @generated | ||
218 | */ | ||
219 | @Override | ||
220 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
221 | switch (featureID) { | ||
222 | case SolverLanguagePackage.METRIC_DEFINITION__HEAD: | ||
223 | return basicSetHead(null, msgs); | ||
224 | case SolverLanguagePackage.METRIC_DEFINITION__BODY: | ||
225 | return basicSetBody(null, msgs); | ||
226 | } | ||
227 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
228 | } | ||
229 | |||
230 | /** | ||
231 | * <!-- begin-user-doc --> | ||
232 | * <!-- end-user-doc --> | ||
233 | * @generated | ||
234 | */ | ||
235 | @Override | ||
236 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
237 | switch (featureID) { | ||
238 | case SolverLanguagePackage.METRIC_DEFINITION__HEAD: | ||
239 | return getHead(); | ||
240 | case SolverLanguagePackage.METRIC_DEFINITION__BODY: | ||
241 | return getBody(); | ||
242 | case SolverLanguagePackage.METRIC_DEFINITION__TYPE: | ||
243 | if (resolve) return getType(); | ||
244 | return basicGetType(); | ||
245 | } | ||
246 | return super.eGet(featureID, resolve, coreType); | ||
247 | } | ||
248 | |||
249 | /** | ||
250 | * <!-- begin-user-doc --> | ||
251 | * <!-- end-user-doc --> | ||
252 | * @generated | ||
253 | */ | ||
254 | @Override | ||
255 | public void eSet(int featureID, Object newValue) { | ||
256 | switch (featureID) { | ||
257 | case SolverLanguagePackage.METRIC_DEFINITION__HEAD: | ||
258 | setHead((Expression)newValue); | ||
259 | return; | ||
260 | case SolverLanguagePackage.METRIC_DEFINITION__BODY: | ||
261 | setBody((Expression)newValue); | ||
262 | return; | ||
263 | case SolverLanguagePackage.METRIC_DEFINITION__TYPE: | ||
264 | setType((NamedElement)newValue); | ||
265 | return; | ||
266 | } | ||
267 | super.eSet(featureID, newValue); | ||
268 | } | ||
269 | |||
270 | /** | ||
271 | * <!-- begin-user-doc --> | ||
272 | * <!-- end-user-doc --> | ||
273 | * @generated | ||
274 | */ | ||
275 | @Override | ||
276 | public void eUnset(int featureID) { | ||
277 | switch (featureID) { | ||
278 | case SolverLanguagePackage.METRIC_DEFINITION__HEAD: | ||
279 | setHead((Expression)null); | ||
280 | return; | ||
281 | case SolverLanguagePackage.METRIC_DEFINITION__BODY: | ||
282 | setBody((Expression)null); | ||
283 | return; | ||
284 | case SolverLanguagePackage.METRIC_DEFINITION__TYPE: | ||
285 | setType((NamedElement)null); | ||
286 | return; | ||
287 | } | ||
288 | super.eUnset(featureID); | ||
289 | } | ||
290 | |||
291 | /** | ||
292 | * <!-- begin-user-doc --> | ||
293 | * <!-- end-user-doc --> | ||
294 | * @generated | ||
295 | */ | ||
296 | @Override | ||
297 | public boolean eIsSet(int featureID) { | ||
298 | switch (featureID) { | ||
299 | case SolverLanguagePackage.METRIC_DEFINITION__HEAD: | ||
300 | return head != null; | ||
301 | case SolverLanguagePackage.METRIC_DEFINITION__BODY: | ||
302 | return body != null; | ||
303 | case SolverLanguagePackage.METRIC_DEFINITION__TYPE: | ||
304 | return type != null; | ||
305 | } | ||
306 | return super.eIsSet(featureID); | ||
307 | } | ||
308 | |||
309 | } //MetricDefinitionImpl | ||