diff options
author | Kristóf Marussy <marussy@mit.bme.hu> | 2020-05-19 21:18:06 +0200 |
---|---|---|
committer | Kristóf Marussy <marussy@mit.bme.hu> | 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/LetImpl.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/LetImpl.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/LetImpl.java | 224 |
1 files changed, 224 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/LetImpl.java b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/LetImpl.java new file mode 100644 index 00000000..841c74c7 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/LetImpl.java | |||
@@ -0,0 +1,224 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.21.0 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.solverLanguage.impl; | ||
5 | |||
6 | import java.util.Collection; | ||
7 | |||
8 | import org.eclipse.emf.common.notify.Notification; | ||
9 | import org.eclipse.emf.common.notify.NotificationChain; | ||
10 | |||
11 | import org.eclipse.emf.common.util.EList; | ||
12 | |||
13 | import org.eclipse.emf.ecore.EClass; | ||
14 | import org.eclipse.emf.ecore.InternalEObject; | ||
15 | |||
16 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
17 | |||
18 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
19 | import org.eclipse.emf.ecore.util.InternalEList; | ||
20 | |||
21 | import org.eclipse.viatra.solver.language.solverLanguage.Expression; | ||
22 | import org.eclipse.viatra.solver.language.solverLanguage.Let; | ||
23 | import org.eclipse.viatra.solver.language.solverLanguage.LetBinding; | ||
24 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | ||
25 | |||
26 | /** | ||
27 | * <!-- begin-user-doc --> | ||
28 | * An implementation of the model object '<em><b>Let</b></em>'. | ||
29 | * <!-- end-user-doc --> | ||
30 | * <p> | ||
31 | * The following features are implemented: | ||
32 | * </p> | ||
33 | * <ul> | ||
34 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.LetImpl#getBindings <em>Bindings</em>}</li> | ||
35 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.LetImpl#getBody <em>Body</em>}</li> | ||
36 | * </ul> | ||
37 | * | ||
38 | * @generated | ||
39 | */ | ||
40 | public class LetImpl extends ExpressionImpl implements Let { | ||
41 | /** | ||
42 | * The cached value of the '{@link #getBindings() <em>Bindings</em>}' containment reference list. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @see #getBindings() | ||
46 | * @generated | ||
47 | * @ordered | ||
48 | */ | ||
49 | protected EList<LetBinding> bindings; | ||
50 | |||
51 | /** | ||
52 | * The cached value of the '{@link #getBody() <em>Body</em>}' containment reference. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @see #getBody() | ||
56 | * @generated | ||
57 | * @ordered | ||
58 | */ | ||
59 | protected Expression body; | ||
60 | |||
61 | /** | ||
62 | * <!-- begin-user-doc --> | ||
63 | * <!-- end-user-doc --> | ||
64 | * @generated | ||
65 | */ | ||
66 | protected LetImpl() { | ||
67 | super(); | ||
68 | } | ||
69 | |||
70 | /** | ||
71 | * <!-- begin-user-doc --> | ||
72 | * <!-- end-user-doc --> | ||
73 | * @generated | ||
74 | */ | ||
75 | @Override | ||
76 | protected EClass eStaticClass() { | ||
77 | return SolverLanguagePackage.Literals.LET; | ||
78 | } | ||
79 | |||
80 | /** | ||
81 | * <!-- begin-user-doc --> | ||
82 | * <!-- end-user-doc --> | ||
83 | * @generated | ||
84 | */ | ||
85 | @Override | ||
86 | public EList<LetBinding> getBindings() { | ||
87 | if (bindings == null) { | ||
88 | bindings = new EObjectContainmentEList<LetBinding>(LetBinding.class, this, SolverLanguagePackage.LET__BINDINGS); | ||
89 | } | ||
90 | return bindings; | ||
91 | } | ||
92 | |||
93 | /** | ||
94 | * <!-- begin-user-doc --> | ||
95 | * <!-- end-user-doc --> | ||
96 | * @generated | ||
97 | */ | ||
98 | @Override | ||
99 | public Expression getBody() { | ||
100 | return body; | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | public NotificationChain basicSetBody(Expression newBody, NotificationChain msgs) { | ||
109 | Expression oldBody = body; | ||
110 | body = newBody; | ||
111 | if (eNotificationRequired()) { | ||
112 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.LET__BODY, oldBody, newBody); | ||
113 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
114 | } | ||
115 | return msgs; | ||
116 | } | ||
117 | |||
118 | /** | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @generated | ||
122 | */ | ||
123 | @Override | ||
124 | public void setBody(Expression newBody) { | ||
125 | if (newBody != body) { | ||
126 | NotificationChain msgs = null; | ||
127 | if (body != null) | ||
128 | msgs = ((InternalEObject)body).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.LET__BODY, null, msgs); | ||
129 | if (newBody != null) | ||
130 | msgs = ((InternalEObject)newBody).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.LET__BODY, null, msgs); | ||
131 | msgs = basicSetBody(newBody, msgs); | ||
132 | if (msgs != null) msgs.dispatch(); | ||
133 | } | ||
134 | else if (eNotificationRequired()) | ||
135 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.LET__BODY, newBody, newBody)); | ||
136 | } | ||
137 | |||
138 | /** | ||
139 | * <!-- begin-user-doc --> | ||
140 | * <!-- end-user-doc --> | ||
141 | * @generated | ||
142 | */ | ||
143 | @Override | ||
144 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
145 | switch (featureID) { | ||
146 | case SolverLanguagePackage.LET__BINDINGS: | ||
147 | return ((InternalEList<?>)getBindings()).basicRemove(otherEnd, msgs); | ||
148 | case SolverLanguagePackage.LET__BODY: | ||
149 | return basicSetBody(null, msgs); | ||
150 | } | ||
151 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
152 | } | ||
153 | |||
154 | /** | ||
155 | * <!-- begin-user-doc --> | ||
156 | * <!-- end-user-doc --> | ||
157 | * @generated | ||
158 | */ | ||
159 | @Override | ||
160 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
161 | switch (featureID) { | ||
162 | case SolverLanguagePackage.LET__BINDINGS: | ||
163 | return getBindings(); | ||
164 | case SolverLanguagePackage.LET__BODY: | ||
165 | return getBody(); | ||
166 | } | ||
167 | return super.eGet(featureID, resolve, coreType); | ||
168 | } | ||
169 | |||
170 | /** | ||
171 | * <!-- begin-user-doc --> | ||
172 | * <!-- end-user-doc --> | ||
173 | * @generated | ||
174 | */ | ||
175 | @SuppressWarnings("unchecked") | ||
176 | @Override | ||
177 | public void eSet(int featureID, Object newValue) { | ||
178 | switch (featureID) { | ||
179 | case SolverLanguagePackage.LET__BINDINGS: | ||
180 | getBindings().clear(); | ||
181 | getBindings().addAll((Collection<? extends LetBinding>)newValue); | ||
182 | return; | ||
183 | case SolverLanguagePackage.LET__BODY: | ||
184 | setBody((Expression)newValue); | ||
185 | return; | ||
186 | } | ||
187 | super.eSet(featureID, newValue); | ||
188 | } | ||
189 | |||
190 | /** | ||
191 | * <!-- begin-user-doc --> | ||
192 | * <!-- end-user-doc --> | ||
193 | * @generated | ||
194 | */ | ||
195 | @Override | ||
196 | public void eUnset(int featureID) { | ||
197 | switch (featureID) { | ||
198 | case SolverLanguagePackage.LET__BINDINGS: | ||
199 | getBindings().clear(); | ||
200 | return; | ||
201 | case SolverLanguagePackage.LET__BODY: | ||
202 | setBody((Expression)null); | ||
203 | return; | ||
204 | } | ||
205 | super.eUnset(featureID); | ||
206 | } | ||
207 | |||
208 | /** | ||
209 | * <!-- begin-user-doc --> | ||
210 | * <!-- end-user-doc --> | ||
211 | * @generated | ||
212 | */ | ||
213 | @Override | ||
214 | public boolean eIsSet(int featureID) { | ||
215 | switch (featureID) { | ||
216 | case SolverLanguagePackage.LET__BINDINGS: | ||
217 | return bindings != null && !bindings.isEmpty(); | ||
218 | case SolverLanguagePackage.LET__BODY: | ||
219 | return body != null; | ||
220 | } | ||
221 | return super.eIsSet(featureID); | ||
222 | } | ||
223 | |||
224 | } //LetImpl | ||