aboutsummaryrefslogtreecommitdiffstats
path: root/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/TypeScopeImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/TypeScopeImpl.java')
-rw-r--r--language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/TypeScopeImpl.java317
1 files changed, 317 insertions, 0 deletions
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/TypeScopeImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/TypeScopeImpl.java
new file mode 100644
index 00000000..608cc015
--- /dev/null
+++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/TypeScopeImpl.java
@@ -0,0 +1,317 @@
1/**
2 */
3package org.eclipse.viatra.solver.language.model.problem.impl;
4
5import org.eclipse.emf.common.notify.Notification;
6import org.eclipse.emf.common.notify.NotificationChain;
7
8import org.eclipse.emf.ecore.EClass;
9import org.eclipse.emf.ecore.InternalEObject;
10
11import org.eclipse.emf.ecore.impl.ENotificationImpl;
12import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
13
14import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration;
15import org.eclipse.viatra.solver.language.model.problem.Multiplicity;
16import org.eclipse.viatra.solver.language.model.problem.ProblemPackage;
17import org.eclipse.viatra.solver.language.model.problem.TypeScope;
18
19/**
20 * <!-- begin-user-doc -->
21 * An implementation of the model object '<em><b>Type Scope</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.model.problem.impl.TypeScopeImpl#getTargetType <em>Target Type</em>}</li>
28 * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.TypeScopeImpl#isIncrement <em>Increment</em>}</li>
29 * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.TypeScopeImpl#getMultiplicity <em>Multiplicity</em>}</li>
30 * </ul>
31 *
32 * @generated
33 */
34public class TypeScopeImpl extends MinimalEObjectImpl.Container implements TypeScope {
35 /**
36 * The cached value of the '{@link #getTargetType() <em>Target Type</em>}' reference.
37 * <!-- begin-user-doc -->
38 * <!-- end-user-doc -->
39 * @see #getTargetType()
40 * @generated
41 * @ordered
42 */
43 protected ClassDeclaration targetType;
44
45 /**
46 * The default value of the '{@link #isIncrement() <em>Increment</em>}' attribute.
47 * <!-- begin-user-doc -->
48 * <!-- end-user-doc -->
49 * @see #isIncrement()
50 * @generated
51 * @ordered
52 */
53 protected static final boolean INCREMENT_EDEFAULT = false;
54
55 /**
56 * The cached value of the '{@link #isIncrement() <em>Increment</em>}' attribute.
57 * <!-- begin-user-doc -->
58 * <!-- end-user-doc -->
59 * @see #isIncrement()
60 * @generated
61 * @ordered
62 */
63 protected boolean increment = INCREMENT_EDEFAULT;
64
65 /**
66 * The cached value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' containment reference.
67 * <!-- begin-user-doc -->
68 * <!-- end-user-doc -->
69 * @see #getMultiplicity()
70 * @generated
71 * @ordered
72 */
73 protected Multiplicity multiplicity;
74
75 /**
76 * <!-- begin-user-doc -->
77 * <!-- end-user-doc -->
78 * @generated
79 */
80 protected TypeScopeImpl() {
81 super();
82 }
83
84 /**
85 * <!-- begin-user-doc -->
86 * <!-- end-user-doc -->
87 * @generated
88 */
89 @Override
90 protected EClass eStaticClass() {
91 return ProblemPackage.Literals.TYPE_SCOPE;
92 }
93
94 /**
95 * <!-- begin-user-doc -->
96 * <!-- end-user-doc -->
97 * @generated
98 */
99 public ClassDeclaration getTargetType() {
100 if (targetType != null && targetType.eIsProxy()) {
101 InternalEObject oldTargetType = (InternalEObject) targetType;
102 targetType = (ClassDeclaration) eResolveProxy(oldTargetType);
103 if (targetType != oldTargetType) {
104 if (eNotificationRequired())
105 eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProblemPackage.TYPE_SCOPE__TARGET_TYPE,
106 oldTargetType, targetType));
107 }
108 }
109 return targetType;
110 }
111
112 /**
113 * <!-- begin-user-doc -->
114 * <!-- end-user-doc -->
115 * @generated
116 */
117 public ClassDeclaration basicGetTargetType() {
118 return targetType;
119 }
120
121 /**
122 * <!-- begin-user-doc -->
123 * <!-- end-user-doc -->
124 * @generated
125 */
126 public void setTargetType(ClassDeclaration newTargetType) {
127 ClassDeclaration oldTargetType = targetType;
128 targetType = newTargetType;
129 if (eNotificationRequired())
130 eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.TYPE_SCOPE__TARGET_TYPE, oldTargetType,
131 targetType));
132 }
133
134 /**
135 * <!-- begin-user-doc -->
136 * <!-- end-user-doc -->
137 * @generated
138 */
139 public boolean isIncrement() {
140 return increment;
141 }
142
143 /**
144 * <!-- begin-user-doc -->
145 * <!-- end-user-doc -->
146 * @generated
147 */
148 public void setIncrement(boolean newIncrement) {
149 boolean oldIncrement = increment;
150 increment = newIncrement;
151 if (eNotificationRequired())
152 eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.TYPE_SCOPE__INCREMENT, oldIncrement,
153 increment));
154 }
155
156 /**
157 * <!-- begin-user-doc -->
158 * <!-- end-user-doc -->
159 * @generated
160 */
161 public Multiplicity getMultiplicity() {
162 return multiplicity;
163 }
164
165 /**
166 * <!-- begin-user-doc -->
167 * <!-- end-user-doc -->
168 * @generated
169 */
170 public NotificationChain basicSetMultiplicity(Multiplicity newMultiplicity, NotificationChain msgs) {
171 Multiplicity oldMultiplicity = multiplicity;
172 multiplicity = newMultiplicity;
173 if (eNotificationRequired()) {
174 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
175 ProblemPackage.TYPE_SCOPE__MULTIPLICITY, oldMultiplicity, newMultiplicity);
176 if (msgs == null)
177 msgs = notification;
178 else
179 msgs.add(notification);
180 }
181 return msgs;
182 }
183
184 /**
185 * <!-- begin-user-doc -->
186 * <!-- end-user-doc -->
187 * @generated
188 */
189 public void setMultiplicity(Multiplicity newMultiplicity) {
190 if (newMultiplicity != multiplicity) {
191 NotificationChain msgs = null;
192 if (multiplicity != null)
193 msgs = ((InternalEObject) multiplicity).eInverseRemove(this,
194 EOPPOSITE_FEATURE_BASE - ProblemPackage.TYPE_SCOPE__MULTIPLICITY, null, msgs);
195 if (newMultiplicity != null)
196 msgs = ((InternalEObject) newMultiplicity).eInverseAdd(this,
197 EOPPOSITE_FEATURE_BASE - ProblemPackage.TYPE_SCOPE__MULTIPLICITY, null, msgs);
198 msgs = basicSetMultiplicity(newMultiplicity, msgs);
199 if (msgs != null)
200 msgs.dispatch();
201 } else if (eNotificationRequired())
202 eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.TYPE_SCOPE__MULTIPLICITY,
203 newMultiplicity, newMultiplicity));
204 }
205
206 /**
207 * <!-- begin-user-doc -->
208 * <!-- end-user-doc -->
209 * @generated
210 */
211 @Override
212 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
213 switch (featureID) {
214 case ProblemPackage.TYPE_SCOPE__MULTIPLICITY:
215 return basicSetMultiplicity(null, msgs);
216 }
217 return super.eInverseRemove(otherEnd, featureID, msgs);
218 }
219
220 /**
221 * <!-- begin-user-doc -->
222 * <!-- end-user-doc -->
223 * @generated
224 */
225 @Override
226 public Object eGet(int featureID, boolean resolve, boolean coreType) {
227 switch (featureID) {
228 case ProblemPackage.TYPE_SCOPE__TARGET_TYPE:
229 if (resolve)
230 return getTargetType();
231 return basicGetTargetType();
232 case ProblemPackage.TYPE_SCOPE__INCREMENT:
233 return isIncrement();
234 case ProblemPackage.TYPE_SCOPE__MULTIPLICITY:
235 return getMultiplicity();
236 }
237 return super.eGet(featureID, resolve, coreType);
238 }
239
240 /**
241 * <!-- begin-user-doc -->
242 * <!-- end-user-doc -->
243 * @generated
244 */
245 @Override
246 public void eSet(int featureID, Object newValue) {
247 switch (featureID) {
248 case ProblemPackage.TYPE_SCOPE__TARGET_TYPE:
249 setTargetType((ClassDeclaration) newValue);
250 return;
251 case ProblemPackage.TYPE_SCOPE__INCREMENT:
252 setIncrement((Boolean) newValue);
253 return;
254 case ProblemPackage.TYPE_SCOPE__MULTIPLICITY:
255 setMultiplicity((Multiplicity) newValue);
256 return;
257 }
258 super.eSet(featureID, newValue);
259 }
260
261 /**
262 * <!-- begin-user-doc -->
263 * <!-- end-user-doc -->
264 * @generated
265 */
266 @Override
267 public void eUnset(int featureID) {
268 switch (featureID) {
269 case ProblemPackage.TYPE_SCOPE__TARGET_TYPE:
270 setTargetType((ClassDeclaration) null);
271 return;
272 case ProblemPackage.TYPE_SCOPE__INCREMENT:
273 setIncrement(INCREMENT_EDEFAULT);
274 return;
275 case ProblemPackage.TYPE_SCOPE__MULTIPLICITY:
276 setMultiplicity((Multiplicity) null);
277 return;
278 }
279 super.eUnset(featureID);
280 }
281
282 /**
283 * <!-- begin-user-doc -->
284 * <!-- end-user-doc -->
285 * @generated
286 */
287 @Override
288 public boolean eIsSet(int featureID) {
289 switch (featureID) {
290 case ProblemPackage.TYPE_SCOPE__TARGET_TYPE:
291 return targetType != null;
292 case ProblemPackage.TYPE_SCOPE__INCREMENT:
293 return increment != INCREMENT_EDEFAULT;
294 case ProblemPackage.TYPE_SCOPE__MULTIPLICITY:
295 return multiplicity != null;
296 }
297 return super.eIsSet(featureID);
298 }
299
300 /**
301 * <!-- begin-user-doc -->
302 * <!-- end-user-doc -->
303 * @generated
304 */
305 @Override
306 public String toString() {
307 if (eIsProxy())
308 return super.toString();
309
310 StringBuilder result = new StringBuilder(super.toString());
311 result.append(" (increment: ");
312 result.append(increment);
313 result.append(')');
314 return result.toString();
315 }
316
317} //TypeScopeImpl