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