diff options
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CallImpl.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CallImpl.java | 401 |
1 files changed, 401 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CallImpl.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CallImpl.java new file mode 100644 index 00000000..fde31be5 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CallImpl.java | |||
@@ -0,0 +1,401 @@ | |||
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.ArgumentList; | ||
15 | import org.eclipse.viatra.solver.language.solverLanguage.Call; | ||
16 | import org.eclipse.viatra.solver.language.solverLanguage.Reference; | ||
17 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | ||
18 | |||
19 | /** | ||
20 | * <!-- begin-user-doc --> | ||
21 | * An implementation of the model object '<em><b>Call</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.CallImpl#getFunctor <em>Functor</em>}</li> | ||
28 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.CallImpl#getArgumentList <em>Argument List</em>}</li> | ||
29 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.CallImpl#isTransitiveClosure <em>Transitive Closure</em>}</li> | ||
30 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.CallImpl#isReflexiveTransitiveClosure <em>Reflexive Transitive Closure</em>}</li> | ||
31 | * </ul> | ||
32 | * | ||
33 | * @generated | ||
34 | */ | ||
35 | public class CallImpl extends ExpressionImpl implements Call | ||
36 | { | ||
37 | /** | ||
38 | * The cached value of the '{@link #getFunctor() <em>Functor</em>}' containment reference. | ||
39 | * <!-- begin-user-doc --> | ||
40 | * <!-- end-user-doc --> | ||
41 | * @see #getFunctor() | ||
42 | * @generated | ||
43 | * @ordered | ||
44 | */ | ||
45 | protected Reference functor; | ||
46 | |||
47 | /** | ||
48 | * The cached value of the '{@link #getArgumentList() <em>Argument List</em>}' containment reference. | ||
49 | * <!-- begin-user-doc --> | ||
50 | * <!-- end-user-doc --> | ||
51 | * @see #getArgumentList() | ||
52 | * @generated | ||
53 | * @ordered | ||
54 | */ | ||
55 | protected ArgumentList argumentList; | ||
56 | |||
57 | /** | ||
58 | * The default value of the '{@link #isTransitiveClosure() <em>Transitive Closure</em>}' attribute. | ||
59 | * <!-- begin-user-doc --> | ||
60 | * <!-- end-user-doc --> | ||
61 | * @see #isTransitiveClosure() | ||
62 | * @generated | ||
63 | * @ordered | ||
64 | */ | ||
65 | protected static final boolean TRANSITIVE_CLOSURE_EDEFAULT = false; | ||
66 | |||
67 | /** | ||
68 | * The cached value of the '{@link #isTransitiveClosure() <em>Transitive Closure</em>}' attribute. | ||
69 | * <!-- begin-user-doc --> | ||
70 | * <!-- end-user-doc --> | ||
71 | * @see #isTransitiveClosure() | ||
72 | * @generated | ||
73 | * @ordered | ||
74 | */ | ||
75 | protected boolean transitiveClosure = TRANSITIVE_CLOSURE_EDEFAULT; | ||
76 | |||
77 | /** | ||
78 | * The default value of the '{@link #isReflexiveTransitiveClosure() <em>Reflexive Transitive Closure</em>}' attribute. | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @see #isReflexiveTransitiveClosure() | ||
82 | * @generated | ||
83 | * @ordered | ||
84 | */ | ||
85 | protected static final boolean REFLEXIVE_TRANSITIVE_CLOSURE_EDEFAULT = false; | ||
86 | |||
87 | /** | ||
88 | * The cached value of the '{@link #isReflexiveTransitiveClosure() <em>Reflexive Transitive Closure</em>}' attribute. | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @see #isReflexiveTransitiveClosure() | ||
92 | * @generated | ||
93 | * @ordered | ||
94 | */ | ||
95 | protected boolean reflexiveTransitiveClosure = REFLEXIVE_TRANSITIVE_CLOSURE_EDEFAULT; | ||
96 | |||
97 | /** | ||
98 | * <!-- begin-user-doc --> | ||
99 | * <!-- end-user-doc --> | ||
100 | * @generated | ||
101 | */ | ||
102 | protected CallImpl() | ||
103 | { | ||
104 | super(); | ||
105 | } | ||
106 | |||
107 | /** | ||
108 | * <!-- begin-user-doc --> | ||
109 | * <!-- end-user-doc --> | ||
110 | * @generated | ||
111 | */ | ||
112 | @Override | ||
113 | protected EClass eStaticClass() | ||
114 | { | ||
115 | return SolverLanguagePackage.Literals.CALL; | ||
116 | } | ||
117 | |||
118 | /** | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @generated | ||
122 | */ | ||
123 | @Override | ||
124 | public Reference getFunctor() | ||
125 | { | ||
126 | return functor; | ||
127 | } | ||
128 | |||
129 | /** | ||
130 | * <!-- begin-user-doc --> | ||
131 | * <!-- end-user-doc --> | ||
132 | * @generated | ||
133 | */ | ||
134 | public NotificationChain basicSetFunctor(Reference newFunctor, NotificationChain msgs) | ||
135 | { | ||
136 | Reference oldFunctor = functor; | ||
137 | functor = newFunctor; | ||
138 | if (eNotificationRequired()) | ||
139 | { | ||
140 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CALL__FUNCTOR, oldFunctor, newFunctor); | ||
141 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
142 | } | ||
143 | return msgs; | ||
144 | } | ||
145 | |||
146 | /** | ||
147 | * <!-- begin-user-doc --> | ||
148 | * <!-- end-user-doc --> | ||
149 | * @generated | ||
150 | */ | ||
151 | @Override | ||
152 | public void setFunctor(Reference newFunctor) | ||
153 | { | ||
154 | if (newFunctor != functor) | ||
155 | { | ||
156 | NotificationChain msgs = null; | ||
157 | if (functor != null) | ||
158 | msgs = ((InternalEObject)functor).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CALL__FUNCTOR, null, msgs); | ||
159 | if (newFunctor != null) | ||
160 | msgs = ((InternalEObject)newFunctor).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CALL__FUNCTOR, null, msgs); | ||
161 | msgs = basicSetFunctor(newFunctor, msgs); | ||
162 | if (msgs != null) msgs.dispatch(); | ||
163 | } | ||
164 | else if (eNotificationRequired()) | ||
165 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CALL__FUNCTOR, newFunctor, newFunctor)); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * <!-- begin-user-doc --> | ||
170 | * <!-- end-user-doc --> | ||
171 | * @generated | ||
172 | */ | ||
173 | @Override | ||
174 | public ArgumentList getArgumentList() | ||
175 | { | ||
176 | return argumentList; | ||
177 | } | ||
178 | |||
179 | /** | ||
180 | * <!-- begin-user-doc --> | ||
181 | * <!-- end-user-doc --> | ||
182 | * @generated | ||
183 | */ | ||
184 | public NotificationChain basicSetArgumentList(ArgumentList newArgumentList, NotificationChain msgs) | ||
185 | { | ||
186 | ArgumentList oldArgumentList = argumentList; | ||
187 | argumentList = newArgumentList; | ||
188 | if (eNotificationRequired()) | ||
189 | { | ||
190 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CALL__ARGUMENT_LIST, oldArgumentList, newArgumentList); | ||
191 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
192 | } | ||
193 | return msgs; | ||
194 | } | ||
195 | |||
196 | /** | ||
197 | * <!-- begin-user-doc --> | ||
198 | * <!-- end-user-doc --> | ||
199 | * @generated | ||
200 | */ | ||
201 | @Override | ||
202 | public void setArgumentList(ArgumentList newArgumentList) | ||
203 | { | ||
204 | if (newArgumentList != argumentList) | ||
205 | { | ||
206 | NotificationChain msgs = null; | ||
207 | if (argumentList != null) | ||
208 | msgs = ((InternalEObject)argumentList).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CALL__ARGUMENT_LIST, null, msgs); | ||
209 | if (newArgumentList != null) | ||
210 | msgs = ((InternalEObject)newArgumentList).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CALL__ARGUMENT_LIST, null, msgs); | ||
211 | msgs = basicSetArgumentList(newArgumentList, msgs); | ||
212 | if (msgs != null) msgs.dispatch(); | ||
213 | } | ||
214 | else if (eNotificationRequired()) | ||
215 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CALL__ARGUMENT_LIST, newArgumentList, newArgumentList)); | ||
216 | } | ||
217 | |||
218 | /** | ||
219 | * <!-- begin-user-doc --> | ||
220 | * <!-- end-user-doc --> | ||
221 | * @generated | ||
222 | */ | ||
223 | @Override | ||
224 | public boolean isTransitiveClosure() | ||
225 | { | ||
226 | return transitiveClosure; | ||
227 | } | ||
228 | |||
229 | /** | ||
230 | * <!-- begin-user-doc --> | ||
231 | * <!-- end-user-doc --> | ||
232 | * @generated | ||
233 | */ | ||
234 | @Override | ||
235 | public void setTransitiveClosure(boolean newTransitiveClosure) | ||
236 | { | ||
237 | boolean oldTransitiveClosure = transitiveClosure; | ||
238 | transitiveClosure = newTransitiveClosure; | ||
239 | if (eNotificationRequired()) | ||
240 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CALL__TRANSITIVE_CLOSURE, oldTransitiveClosure, transitiveClosure)); | ||
241 | } | ||
242 | |||
243 | /** | ||
244 | * <!-- begin-user-doc --> | ||
245 | * <!-- end-user-doc --> | ||
246 | * @generated | ||
247 | */ | ||
248 | @Override | ||
249 | public boolean isReflexiveTransitiveClosure() | ||
250 | { | ||
251 | return reflexiveTransitiveClosure; | ||
252 | } | ||
253 | |||
254 | /** | ||
255 | * <!-- begin-user-doc --> | ||
256 | * <!-- end-user-doc --> | ||
257 | * @generated | ||
258 | */ | ||
259 | @Override | ||
260 | public void setReflexiveTransitiveClosure(boolean newReflexiveTransitiveClosure) | ||
261 | { | ||
262 | boolean oldReflexiveTransitiveClosure = reflexiveTransitiveClosure; | ||
263 | reflexiveTransitiveClosure = newReflexiveTransitiveClosure; | ||
264 | if (eNotificationRequired()) | ||
265 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CALL__REFLEXIVE_TRANSITIVE_CLOSURE, oldReflexiveTransitiveClosure, reflexiveTransitiveClosure)); | ||
266 | } | ||
267 | |||
268 | /** | ||
269 | * <!-- begin-user-doc --> | ||
270 | * <!-- end-user-doc --> | ||
271 | * @generated | ||
272 | */ | ||
273 | @Override | ||
274 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) | ||
275 | { | ||
276 | switch (featureID) | ||
277 | { | ||
278 | case SolverLanguagePackage.CALL__FUNCTOR: | ||
279 | return basicSetFunctor(null, msgs); | ||
280 | case SolverLanguagePackage.CALL__ARGUMENT_LIST: | ||
281 | return basicSetArgumentList(null, msgs); | ||
282 | } | ||
283 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
284 | } | ||
285 | |||
286 | /** | ||
287 | * <!-- begin-user-doc --> | ||
288 | * <!-- end-user-doc --> | ||
289 | * @generated | ||
290 | */ | ||
291 | @Override | ||
292 | public Object eGet(int featureID, boolean resolve, boolean coreType) | ||
293 | { | ||
294 | switch (featureID) | ||
295 | { | ||
296 | case SolverLanguagePackage.CALL__FUNCTOR: | ||
297 | return getFunctor(); | ||
298 | case SolverLanguagePackage.CALL__ARGUMENT_LIST: | ||
299 | return getArgumentList(); | ||
300 | case SolverLanguagePackage.CALL__TRANSITIVE_CLOSURE: | ||
301 | return isTransitiveClosure(); | ||
302 | case SolverLanguagePackage.CALL__REFLEXIVE_TRANSITIVE_CLOSURE: | ||
303 | return isReflexiveTransitiveClosure(); | ||
304 | } | ||
305 | return super.eGet(featureID, resolve, coreType); | ||
306 | } | ||
307 | |||
308 | /** | ||
309 | * <!-- begin-user-doc --> | ||
310 | * <!-- end-user-doc --> | ||
311 | * @generated | ||
312 | */ | ||
313 | @Override | ||
314 | public void eSet(int featureID, Object newValue) | ||
315 | { | ||
316 | switch (featureID) | ||
317 | { | ||
318 | case SolverLanguagePackage.CALL__FUNCTOR: | ||
319 | setFunctor((Reference)newValue); | ||
320 | return; | ||
321 | case SolverLanguagePackage.CALL__ARGUMENT_LIST: | ||
322 | setArgumentList((ArgumentList)newValue); | ||
323 | return; | ||
324 | case SolverLanguagePackage.CALL__TRANSITIVE_CLOSURE: | ||
325 | setTransitiveClosure((Boolean)newValue); | ||
326 | return; | ||
327 | case SolverLanguagePackage.CALL__REFLEXIVE_TRANSITIVE_CLOSURE: | ||
328 | setReflexiveTransitiveClosure((Boolean)newValue); | ||
329 | return; | ||
330 | } | ||
331 | super.eSet(featureID, newValue); | ||
332 | } | ||
333 | |||
334 | /** | ||
335 | * <!-- begin-user-doc --> | ||
336 | * <!-- end-user-doc --> | ||
337 | * @generated | ||
338 | */ | ||
339 | @Override | ||
340 | public void eUnset(int featureID) | ||
341 | { | ||
342 | switch (featureID) | ||
343 | { | ||
344 | case SolverLanguagePackage.CALL__FUNCTOR: | ||
345 | setFunctor((Reference)null); | ||
346 | return; | ||
347 | case SolverLanguagePackage.CALL__ARGUMENT_LIST: | ||
348 | setArgumentList((ArgumentList)null); | ||
349 | return; | ||
350 | case SolverLanguagePackage.CALL__TRANSITIVE_CLOSURE: | ||
351 | setTransitiveClosure(TRANSITIVE_CLOSURE_EDEFAULT); | ||
352 | return; | ||
353 | case SolverLanguagePackage.CALL__REFLEXIVE_TRANSITIVE_CLOSURE: | ||
354 | setReflexiveTransitiveClosure(REFLEXIVE_TRANSITIVE_CLOSURE_EDEFAULT); | ||
355 | return; | ||
356 | } | ||
357 | super.eUnset(featureID); | ||
358 | } | ||
359 | |||
360 | /** | ||
361 | * <!-- begin-user-doc --> | ||
362 | * <!-- end-user-doc --> | ||
363 | * @generated | ||
364 | */ | ||
365 | @Override | ||
366 | public boolean eIsSet(int featureID) | ||
367 | { | ||
368 | switch (featureID) | ||
369 | { | ||
370 | case SolverLanguagePackage.CALL__FUNCTOR: | ||
371 | return functor != null; | ||
372 | case SolverLanguagePackage.CALL__ARGUMENT_LIST: | ||
373 | return argumentList != null; | ||
374 | case SolverLanguagePackage.CALL__TRANSITIVE_CLOSURE: | ||
375 | return transitiveClosure != TRANSITIVE_CLOSURE_EDEFAULT; | ||
376 | case SolverLanguagePackage.CALL__REFLEXIVE_TRANSITIVE_CLOSURE: | ||
377 | return reflexiveTransitiveClosure != REFLEXIVE_TRANSITIVE_CLOSURE_EDEFAULT; | ||
378 | } | ||
379 | return super.eIsSet(featureID); | ||
380 | } | ||
381 | |||
382 | /** | ||
383 | * <!-- begin-user-doc --> | ||
384 | * <!-- end-user-doc --> | ||
385 | * @generated | ||
386 | */ | ||
387 | @Override | ||
388 | public String toString() | ||
389 | { | ||
390 | if (eIsProxy()) return super.toString(); | ||
391 | |||
392 | StringBuilder result = new StringBuilder(super.toString()); | ||
393 | result.append(" (transitiveClosure: "); | ||
394 | result.append(transitiveClosure); | ||
395 | result.append(", reflexiveTransitiveClosure: "); | ||
396 | result.append(reflexiveTransitiveClosure); | ||
397 | result.append(')'); | ||
398 | return result.toString(); | ||
399 | } | ||
400 | |||
401 | } //CallImpl | ||