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/CastExpressionImpl.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/CastExpressionImpl.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CastExpressionImpl.java | 241 |
1 files changed, 241 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CastExpressionImpl.java b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CastExpressionImpl.java new file mode 100644 index 00000000..39e20e46 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/CastExpressionImpl.java | |||
@@ -0,0 +1,241 @@ | |||
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.CastExpression; | ||
15 | import org.eclipse.viatra.solver.language.solverLanguage.Expression; | ||
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>Cast Expression</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.CastExpressionImpl#getBody <em>Body</em>}</li> | ||
28 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.CastExpressionImpl#getType <em>Type</em>}</li> | ||
29 | * </ul> | ||
30 | * | ||
31 | * @generated | ||
32 | */ | ||
33 | public class CastExpressionImpl extends ExpressionImpl implements CastExpression { | ||
34 | /** | ||
35 | * The cached value of the '{@link #getBody() <em>Body</em>}' containment reference. | ||
36 | * <!-- begin-user-doc --> | ||
37 | * <!-- end-user-doc --> | ||
38 | * @see #getBody() | ||
39 | * @generated | ||
40 | * @ordered | ||
41 | */ | ||
42 | protected Expression body; | ||
43 | |||
44 | /** | ||
45 | * The cached value of the '{@link #getType() <em>Type</em>}' reference. | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @see #getType() | ||
49 | * @generated | ||
50 | * @ordered | ||
51 | */ | ||
52 | protected NamedElement type; | ||
53 | |||
54 | /** | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @generated | ||
58 | */ | ||
59 | protected CastExpressionImpl() { | ||
60 | super(); | ||
61 | } | ||
62 | |||
63 | /** | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @generated | ||
67 | */ | ||
68 | @Override | ||
69 | protected EClass eStaticClass() { | ||
70 | return SolverLanguagePackage.Literals.CAST_EXPRESSION; | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @generated | ||
77 | */ | ||
78 | @Override | ||
79 | public Expression getBody() { | ||
80 | return body; | ||
81 | } | ||
82 | |||
83 | /** | ||
84 | * <!-- begin-user-doc --> | ||
85 | * <!-- end-user-doc --> | ||
86 | * @generated | ||
87 | */ | ||
88 | public NotificationChain basicSetBody(Expression newBody, NotificationChain msgs) { | ||
89 | Expression oldBody = body; | ||
90 | body = newBody; | ||
91 | if (eNotificationRequired()) { | ||
92 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CAST_EXPRESSION__BODY, oldBody, newBody); | ||
93 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
94 | } | ||
95 | return msgs; | ||
96 | } | ||
97 | |||
98 | /** | ||
99 | * <!-- begin-user-doc --> | ||
100 | * <!-- end-user-doc --> | ||
101 | * @generated | ||
102 | */ | ||
103 | @Override | ||
104 | public void setBody(Expression newBody) { | ||
105 | if (newBody != body) { | ||
106 | NotificationChain msgs = null; | ||
107 | if (body != null) | ||
108 | msgs = ((InternalEObject)body).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CAST_EXPRESSION__BODY, null, msgs); | ||
109 | if (newBody != null) | ||
110 | msgs = ((InternalEObject)newBody).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CAST_EXPRESSION__BODY, null, msgs); | ||
111 | msgs = basicSetBody(newBody, msgs); | ||
112 | if (msgs != null) msgs.dispatch(); | ||
113 | } | ||
114 | else if (eNotificationRequired()) | ||
115 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CAST_EXPRESSION__BODY, newBody, newBody)); | ||
116 | } | ||
117 | |||
118 | /** | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @generated | ||
122 | */ | ||
123 | @Override | ||
124 | public NamedElement getType() { | ||
125 | if (type != null && type.eIsProxy()) { | ||
126 | InternalEObject oldType = (InternalEObject)type; | ||
127 | type = (NamedElement)eResolveProxy(oldType); | ||
128 | if (type != oldType) { | ||
129 | if (eNotificationRequired()) | ||
130 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, SolverLanguagePackage.CAST_EXPRESSION__TYPE, oldType, type)); | ||
131 | } | ||
132 | } | ||
133 | return type; | ||
134 | } | ||
135 | |||
136 | /** | ||
137 | * <!-- begin-user-doc --> | ||
138 | * <!-- end-user-doc --> | ||
139 | * @generated | ||
140 | */ | ||
141 | public NamedElement basicGetType() { | ||
142 | return type; | ||
143 | } | ||
144 | |||
145 | /** | ||
146 | * <!-- begin-user-doc --> | ||
147 | * <!-- end-user-doc --> | ||
148 | * @generated | ||
149 | */ | ||
150 | @Override | ||
151 | public void setType(NamedElement newType) { | ||
152 | NamedElement oldType = type; | ||
153 | type = newType; | ||
154 | if (eNotificationRequired()) | ||
155 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CAST_EXPRESSION__TYPE, oldType, type)); | ||
156 | } | ||
157 | |||
158 | /** | ||
159 | * <!-- begin-user-doc --> | ||
160 | * <!-- end-user-doc --> | ||
161 | * @generated | ||
162 | */ | ||
163 | @Override | ||
164 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
165 | switch (featureID) { | ||
166 | case SolverLanguagePackage.CAST_EXPRESSION__BODY: | ||
167 | return basicSetBody(null, msgs); | ||
168 | } | ||
169 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
170 | } | ||
171 | |||
172 | /** | ||
173 | * <!-- begin-user-doc --> | ||
174 | * <!-- end-user-doc --> | ||
175 | * @generated | ||
176 | */ | ||
177 | @Override | ||
178 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
179 | switch (featureID) { | ||
180 | case SolverLanguagePackage.CAST_EXPRESSION__BODY: | ||
181 | return getBody(); | ||
182 | case SolverLanguagePackage.CAST_EXPRESSION__TYPE: | ||
183 | if (resolve) return getType(); | ||
184 | return basicGetType(); | ||
185 | } | ||
186 | return super.eGet(featureID, resolve, coreType); | ||
187 | } | ||
188 | |||
189 | /** | ||
190 | * <!-- begin-user-doc --> | ||
191 | * <!-- end-user-doc --> | ||
192 | * @generated | ||
193 | */ | ||
194 | @Override | ||
195 | public void eSet(int featureID, Object newValue) { | ||
196 | switch (featureID) { | ||
197 | case SolverLanguagePackage.CAST_EXPRESSION__BODY: | ||
198 | setBody((Expression)newValue); | ||
199 | return; | ||
200 | case SolverLanguagePackage.CAST_EXPRESSION__TYPE: | ||
201 | setType((NamedElement)newValue); | ||
202 | return; | ||
203 | } | ||
204 | super.eSet(featureID, newValue); | ||
205 | } | ||
206 | |||
207 | /** | ||
208 | * <!-- begin-user-doc --> | ||
209 | * <!-- end-user-doc --> | ||
210 | * @generated | ||
211 | */ | ||
212 | @Override | ||
213 | public void eUnset(int featureID) { | ||
214 | switch (featureID) { | ||
215 | case SolverLanguagePackage.CAST_EXPRESSION__BODY: | ||
216 | setBody((Expression)null); | ||
217 | return; | ||
218 | case SolverLanguagePackage.CAST_EXPRESSION__TYPE: | ||
219 | setType((NamedElement)null); | ||
220 | return; | ||
221 | } | ||
222 | super.eUnset(featureID); | ||
223 | } | ||
224 | |||
225 | /** | ||
226 | * <!-- begin-user-doc --> | ||
227 | * <!-- end-user-doc --> | ||
228 | * @generated | ||
229 | */ | ||
230 | @Override | ||
231 | public boolean eIsSet(int featureID) { | ||
232 | switch (featureID) { | ||
233 | case SolverLanguagePackage.CAST_EXPRESSION__BODY: | ||
234 | return body != null; | ||
235 | case SolverLanguagePackage.CAST_EXPRESSION__TYPE: | ||
236 | return type != null; | ||
237 | } | ||
238 | return super.eIsSet(featureID); | ||
239 | } | ||
240 | |||
241 | } //CastExpressionImpl | ||