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