diff options
Diffstat (limited to 'Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSQuantifiedExImpl.java')
-rw-r--r-- | Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSQuantifiedExImpl.java | 368 |
1 files changed, 368 insertions, 0 deletions
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSQuantifiedExImpl.java b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSQuantifiedExImpl.java new file mode 100644 index 00000000..120f07fa --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSQuantifiedExImpl.java | |||
@@ -0,0 +1,368 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.alloyLanguage.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSMultiplicity; | ||
6 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSQuantifiedEx; | ||
7 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSTerm; | ||
8 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSVariableDeclaration; | ||
9 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguagePackage; | ||
10 | |||
11 | import java.util.Collection; | ||
12 | |||
13 | import org.eclipse.emf.common.notify.Notification; | ||
14 | import org.eclipse.emf.common.notify.NotificationChain; | ||
15 | |||
16 | import org.eclipse.emf.common.util.EList; | ||
17 | |||
18 | import org.eclipse.emf.ecore.EClass; | ||
19 | import org.eclipse.emf.ecore.InternalEObject; | ||
20 | |||
21 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
22 | |||
23 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
24 | import org.eclipse.emf.ecore.util.InternalEList; | ||
25 | |||
26 | /** | ||
27 | * <!-- begin-user-doc --> | ||
28 | * An implementation of the model object '<em><b>ALS Quantified Ex</b></em>'. | ||
29 | * <!-- end-user-doc --> | ||
30 | * <p> | ||
31 | * The following features are implemented: | ||
32 | * </p> | ||
33 | * <ul> | ||
34 | * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSQuantifiedExImpl#getType <em>Type</em>}</li> | ||
35 | * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSQuantifiedExImpl#isDisj <em>Disj</em>}</li> | ||
36 | * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSQuantifiedExImpl#getVariables <em>Variables</em>}</li> | ||
37 | * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSQuantifiedExImpl#getExpression <em>Expression</em>}</li> | ||
38 | * </ul> | ||
39 | * | ||
40 | * @generated | ||
41 | */ | ||
42 | public class ALSQuantifiedExImpl extends ALSTermImpl implements ALSQuantifiedEx | ||
43 | { | ||
44 | /** | ||
45 | * The default value of the '{@link #getType() <em>Type</em>}' attribute. | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @see #getType() | ||
49 | * @generated | ||
50 | * @ordered | ||
51 | */ | ||
52 | protected static final ALSMultiplicity TYPE_EDEFAULT = ALSMultiplicity.ALL; | ||
53 | |||
54 | /** | ||
55 | * The cached value of the '{@link #getType() <em>Type</em>}' attribute. | ||
56 | * <!-- begin-user-doc --> | ||
57 | * <!-- end-user-doc --> | ||
58 | * @see #getType() | ||
59 | * @generated | ||
60 | * @ordered | ||
61 | */ | ||
62 | protected ALSMultiplicity type = TYPE_EDEFAULT; | ||
63 | |||
64 | /** | ||
65 | * The default value of the '{@link #isDisj() <em>Disj</em>}' attribute. | ||
66 | * <!-- begin-user-doc --> | ||
67 | * <!-- end-user-doc --> | ||
68 | * @see #isDisj() | ||
69 | * @generated | ||
70 | * @ordered | ||
71 | */ | ||
72 | protected static final boolean DISJ_EDEFAULT = false; | ||
73 | |||
74 | /** | ||
75 | * The cached value of the '{@link #isDisj() <em>Disj</em>}' attribute. | ||
76 | * <!-- begin-user-doc --> | ||
77 | * <!-- end-user-doc --> | ||
78 | * @see #isDisj() | ||
79 | * @generated | ||
80 | * @ordered | ||
81 | */ | ||
82 | protected boolean disj = DISJ_EDEFAULT; | ||
83 | |||
84 | /** | ||
85 | * The cached value of the '{@link #getVariables() <em>Variables</em>}' containment reference list. | ||
86 | * <!-- begin-user-doc --> | ||
87 | * <!-- end-user-doc --> | ||
88 | * @see #getVariables() | ||
89 | * @generated | ||
90 | * @ordered | ||
91 | */ | ||
92 | protected EList<ALSVariableDeclaration> variables; | ||
93 | |||
94 | /** | ||
95 | * The cached value of the '{@link #getExpression() <em>Expression</em>}' containment reference. | ||
96 | * <!-- begin-user-doc --> | ||
97 | * <!-- end-user-doc --> | ||
98 | * @see #getExpression() | ||
99 | * @generated | ||
100 | * @ordered | ||
101 | */ | ||
102 | protected ALSTerm expression; | ||
103 | |||
104 | /** | ||
105 | * <!-- begin-user-doc --> | ||
106 | * <!-- end-user-doc --> | ||
107 | * @generated | ||
108 | */ | ||
109 | protected ALSQuantifiedExImpl() | ||
110 | { | ||
111 | super(); | ||
112 | } | ||
113 | |||
114 | /** | ||
115 | * <!-- begin-user-doc --> | ||
116 | * <!-- end-user-doc --> | ||
117 | * @generated | ||
118 | */ | ||
119 | @Override | ||
120 | protected EClass eStaticClass() | ||
121 | { | ||
122 | return AlloyLanguagePackage.Literals.ALS_QUANTIFIED_EX; | ||
123 | } | ||
124 | |||
125 | /** | ||
126 | * <!-- begin-user-doc --> | ||
127 | * <!-- end-user-doc --> | ||
128 | * @generated | ||
129 | */ | ||
130 | public ALSMultiplicity getType() | ||
131 | { | ||
132 | return type; | ||
133 | } | ||
134 | |||
135 | /** | ||
136 | * <!-- begin-user-doc --> | ||
137 | * <!-- end-user-doc --> | ||
138 | * @generated | ||
139 | */ | ||
140 | public void setType(ALSMultiplicity newType) | ||
141 | { | ||
142 | ALSMultiplicity oldType = type; | ||
143 | type = newType == null ? TYPE_EDEFAULT : newType; | ||
144 | if (eNotificationRequired()) | ||
145 | eNotify(new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_QUANTIFIED_EX__TYPE, oldType, type)); | ||
146 | } | ||
147 | |||
148 | /** | ||
149 | * <!-- begin-user-doc --> | ||
150 | * <!-- end-user-doc --> | ||
151 | * @generated | ||
152 | */ | ||
153 | public boolean isDisj() | ||
154 | { | ||
155 | return disj; | ||
156 | } | ||
157 | |||
158 | /** | ||
159 | * <!-- begin-user-doc --> | ||
160 | * <!-- end-user-doc --> | ||
161 | * @generated | ||
162 | */ | ||
163 | public void setDisj(boolean newDisj) | ||
164 | { | ||
165 | boolean oldDisj = disj; | ||
166 | disj = newDisj; | ||
167 | if (eNotificationRequired()) | ||
168 | eNotify(new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_QUANTIFIED_EX__DISJ, oldDisj, disj)); | ||
169 | } | ||
170 | |||
171 | /** | ||
172 | * <!-- begin-user-doc --> | ||
173 | * <!-- end-user-doc --> | ||
174 | * @generated | ||
175 | */ | ||
176 | public EList<ALSVariableDeclaration> getVariables() | ||
177 | { | ||
178 | if (variables == null) | ||
179 | { | ||
180 | variables = new EObjectContainmentEList<ALSVariableDeclaration>(ALSVariableDeclaration.class, this, AlloyLanguagePackage.ALS_QUANTIFIED_EX__VARIABLES); | ||
181 | } | ||
182 | return variables; | ||
183 | } | ||
184 | |||
185 | /** | ||
186 | * <!-- begin-user-doc --> | ||
187 | * <!-- end-user-doc --> | ||
188 | * @generated | ||
189 | */ | ||
190 | public ALSTerm getExpression() | ||
191 | { | ||
192 | return expression; | ||
193 | } | ||
194 | |||
195 | /** | ||
196 | * <!-- begin-user-doc --> | ||
197 | * <!-- end-user-doc --> | ||
198 | * @generated | ||
199 | */ | ||
200 | public NotificationChain basicSetExpression(ALSTerm newExpression, NotificationChain msgs) | ||
201 | { | ||
202 | ALSTerm oldExpression = expression; | ||
203 | expression = newExpression; | ||
204 | if (eNotificationRequired()) | ||
205 | { | ||
206 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_QUANTIFIED_EX__EXPRESSION, oldExpression, newExpression); | ||
207 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
208 | } | ||
209 | return msgs; | ||
210 | } | ||
211 | |||
212 | /** | ||
213 | * <!-- begin-user-doc --> | ||
214 | * <!-- end-user-doc --> | ||
215 | * @generated | ||
216 | */ | ||
217 | public void setExpression(ALSTerm newExpression) | ||
218 | { | ||
219 | if (newExpression != expression) | ||
220 | { | ||
221 | NotificationChain msgs = null; | ||
222 | if (expression != null) | ||
223 | msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AlloyLanguagePackage.ALS_QUANTIFIED_EX__EXPRESSION, null, msgs); | ||
224 | if (newExpression != null) | ||
225 | msgs = ((InternalEObject)newExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - AlloyLanguagePackage.ALS_QUANTIFIED_EX__EXPRESSION, null, msgs); | ||
226 | msgs = basicSetExpression(newExpression, msgs); | ||
227 | if (msgs != null) msgs.dispatch(); | ||
228 | } | ||
229 | else if (eNotificationRequired()) | ||
230 | eNotify(new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_QUANTIFIED_EX__EXPRESSION, newExpression, newExpression)); | ||
231 | } | ||
232 | |||
233 | /** | ||
234 | * <!-- begin-user-doc --> | ||
235 | * <!-- end-user-doc --> | ||
236 | * @generated | ||
237 | */ | ||
238 | @Override | ||
239 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) | ||
240 | { | ||
241 | switch (featureID) | ||
242 | { | ||
243 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__VARIABLES: | ||
244 | return ((InternalEList<?>)getVariables()).basicRemove(otherEnd, msgs); | ||
245 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__EXPRESSION: | ||
246 | return basicSetExpression(null, msgs); | ||
247 | } | ||
248 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
249 | } | ||
250 | |||
251 | /** | ||
252 | * <!-- begin-user-doc --> | ||
253 | * <!-- end-user-doc --> | ||
254 | * @generated | ||
255 | */ | ||
256 | @Override | ||
257 | public Object eGet(int featureID, boolean resolve, boolean coreType) | ||
258 | { | ||
259 | switch (featureID) | ||
260 | { | ||
261 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__TYPE: | ||
262 | return getType(); | ||
263 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__DISJ: | ||
264 | return isDisj(); | ||
265 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__VARIABLES: | ||
266 | return getVariables(); | ||
267 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__EXPRESSION: | ||
268 | return getExpression(); | ||
269 | } | ||
270 | return super.eGet(featureID, resolve, coreType); | ||
271 | } | ||
272 | |||
273 | /** | ||
274 | * <!-- begin-user-doc --> | ||
275 | * <!-- end-user-doc --> | ||
276 | * @generated | ||
277 | */ | ||
278 | @SuppressWarnings("unchecked") | ||
279 | @Override | ||
280 | public void eSet(int featureID, Object newValue) | ||
281 | { | ||
282 | switch (featureID) | ||
283 | { | ||
284 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__TYPE: | ||
285 | setType((ALSMultiplicity)newValue); | ||
286 | return; | ||
287 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__DISJ: | ||
288 | setDisj((Boolean)newValue); | ||
289 | return; | ||
290 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__VARIABLES: | ||
291 | getVariables().clear(); | ||
292 | getVariables().addAll((Collection<? extends ALSVariableDeclaration>)newValue); | ||
293 | return; | ||
294 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__EXPRESSION: | ||
295 | setExpression((ALSTerm)newValue); | ||
296 | return; | ||
297 | } | ||
298 | super.eSet(featureID, newValue); | ||
299 | } | ||
300 | |||
301 | /** | ||
302 | * <!-- begin-user-doc --> | ||
303 | * <!-- end-user-doc --> | ||
304 | * @generated | ||
305 | */ | ||
306 | @Override | ||
307 | public void eUnset(int featureID) | ||
308 | { | ||
309 | switch (featureID) | ||
310 | { | ||
311 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__TYPE: | ||
312 | setType(TYPE_EDEFAULT); | ||
313 | return; | ||
314 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__DISJ: | ||
315 | setDisj(DISJ_EDEFAULT); | ||
316 | return; | ||
317 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__VARIABLES: | ||
318 | getVariables().clear(); | ||
319 | return; | ||
320 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__EXPRESSION: | ||
321 | setExpression((ALSTerm)null); | ||
322 | return; | ||
323 | } | ||
324 | super.eUnset(featureID); | ||
325 | } | ||
326 | |||
327 | /** | ||
328 | * <!-- begin-user-doc --> | ||
329 | * <!-- end-user-doc --> | ||
330 | * @generated | ||
331 | */ | ||
332 | @Override | ||
333 | public boolean eIsSet(int featureID) | ||
334 | { | ||
335 | switch (featureID) | ||
336 | { | ||
337 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__TYPE: | ||
338 | return type != TYPE_EDEFAULT; | ||
339 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__DISJ: | ||
340 | return disj != DISJ_EDEFAULT; | ||
341 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__VARIABLES: | ||
342 | return variables != null && !variables.isEmpty(); | ||
343 | case AlloyLanguagePackage.ALS_QUANTIFIED_EX__EXPRESSION: | ||
344 | return expression != null; | ||
345 | } | ||
346 | return super.eIsSet(featureID); | ||
347 | } | ||
348 | |||
349 | /** | ||
350 | * <!-- begin-user-doc --> | ||
351 | * <!-- end-user-doc --> | ||
352 | * @generated | ||
353 | */ | ||
354 | @Override | ||
355 | public String toString() | ||
356 | { | ||
357 | if (eIsProxy()) return super.toString(); | ||
358 | |||
359 | StringBuffer result = new StringBuffer(super.toString()); | ||
360 | result.append(" (type: "); | ||
361 | result.append(type); | ||
362 | result.append(", disj: "); | ||
363 | result.append(disj); | ||
364 | result.append(')'); | ||
365 | return result.toString(); | ||
366 | } | ||
367 | |||
368 | } //ALSQuantifiedExImpl | ||