aboutsummaryrefslogtreecommitdiffstats
path: root/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java')
-rw-r--r--language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java335
1 files changed, 0 insertions, 335 deletions
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java
deleted file mode 100644
index 774a6e33..00000000
--- a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java
+++ /dev/null
@@ -1,335 +0,0 @@
1/**
2 */
3package org.eclipse.viatra.solver.language.model.problem.impl;
4
5import java.util.Collection;
6
7import org.eclipse.emf.common.notify.Notification;
8import org.eclipse.emf.common.notify.NotificationChain;
9
10import org.eclipse.emf.common.util.EList;
11
12import org.eclipse.emf.ecore.EClass;
13import org.eclipse.emf.ecore.InternalEObject;
14
15import org.eclipse.emf.ecore.impl.ENotificationImpl;
16
17import org.eclipse.emf.ecore.util.EObjectContainmentEList;
18import org.eclipse.emf.ecore.util.EObjectResolvingEList;
19import org.eclipse.emf.ecore.util.InternalEList;
20
21import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration;
22import org.eclipse.viatra.solver.language.model.problem.Node;
23import org.eclipse.viatra.solver.language.model.problem.ProblemPackage;
24import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration;
25import org.eclipse.viatra.solver.language.model.problem.Relation;
26
27/**
28 * <!-- begin-user-doc -->
29 * An implementation of the model object '<em><b>Class Declaration</b></em>'.
30 * <!-- end-user-doc -->
31 * <p>
32 * The following features are implemented:
33 * </p>
34 * <ul>
35 * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ClassDeclarationImpl#isAbstract <em>Abstract</em>}</li>
36 * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ClassDeclarationImpl#getSuperTypes <em>Super Types</em>}</li>
37 * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ClassDeclarationImpl#getReferenceDeclarations <em>Reference Declarations</em>}</li>
38 * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ClassDeclarationImpl#getNewNode <em>New Node</em>}</li>
39 * </ul>
40 *
41 * @generated
42 */
43public class ClassDeclarationImpl extends RelationImpl implements ClassDeclaration {
44 /**
45 * The default value of the '{@link #isAbstract() <em>Abstract</em>}' attribute.
46 * <!-- begin-user-doc -->
47 * <!-- end-user-doc -->
48 * @see #isAbstract()
49 * @generated
50 * @ordered
51 */
52 protected static final boolean ABSTRACT_EDEFAULT = false;
53
54 /**
55 * The cached value of the '{@link #isAbstract() <em>Abstract</em>}' attribute.
56 * <!-- begin-user-doc -->
57 * <!-- end-user-doc -->
58 * @see #isAbstract()
59 * @generated
60 * @ordered
61 */
62 protected boolean abstract_ = ABSTRACT_EDEFAULT;
63
64 /**
65 * The cached value of the '{@link #getSuperTypes() <em>Super Types</em>}' reference list.
66 * <!-- begin-user-doc -->
67 * <!-- end-user-doc -->
68 * @see #getSuperTypes()
69 * @generated
70 * @ordered
71 */
72 protected EList<Relation> superTypes;
73
74 /**
75 * The cached value of the '{@link #getReferenceDeclarations() <em>Reference Declarations</em>}' containment reference list.
76 * <!-- begin-user-doc -->
77 * <!-- end-user-doc -->
78 * @see #getReferenceDeclarations()
79 * @generated
80 * @ordered
81 */
82 protected EList<ReferenceDeclaration> referenceDeclarations;
83
84 /**
85 * The cached value of the '{@link #getNewNode() <em>New Node</em>}' containment reference.
86 * <!-- begin-user-doc -->
87 * <!-- end-user-doc -->
88 * @see #getNewNode()
89 * @generated
90 * @ordered
91 */
92 protected Node newNode;
93
94 /**
95 * <!-- begin-user-doc -->
96 * <!-- end-user-doc -->
97 * @generated
98 */
99 protected ClassDeclarationImpl() {
100 super();
101 }
102
103 /**
104 * <!-- begin-user-doc -->
105 * <!-- end-user-doc -->
106 * @generated
107 */
108 @Override
109 protected EClass eStaticClass() {
110 return ProblemPackage.Literals.CLASS_DECLARATION;
111 }
112
113 /**
114 * <!-- begin-user-doc -->
115 * <!-- end-user-doc -->
116 * @generated
117 */
118 public boolean isAbstract() {
119 return abstract_;
120 }
121
122 /**
123 * <!-- begin-user-doc -->
124 * <!-- end-user-doc -->
125 * @generated
126 */
127 public void setAbstract(boolean newAbstract) {
128 boolean oldAbstract = abstract_;
129 abstract_ = newAbstract;
130 if (eNotificationRequired())
131 eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.CLASS_DECLARATION__ABSTRACT,
132 oldAbstract, abstract_));
133 }
134
135 /**
136 * <!-- begin-user-doc -->
137 * <!-- end-user-doc -->
138 * @generated
139 */
140 public EList<Relation> getSuperTypes() {
141 if (superTypes == null) {
142 superTypes = new EObjectResolvingEList<Relation>(Relation.class, this,
143 ProblemPackage.CLASS_DECLARATION__SUPER_TYPES);
144 }
145 return superTypes;
146 }
147
148 /**
149 * <!-- begin-user-doc -->
150 * <!-- end-user-doc -->
151 * @generated
152 */
153 public EList<ReferenceDeclaration> getReferenceDeclarations() {
154 if (referenceDeclarations == null) {
155 referenceDeclarations = new EObjectContainmentEList<ReferenceDeclaration>(ReferenceDeclaration.class, this,
156 ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS);
157 }
158 return referenceDeclarations;
159 }
160
161 /**
162 * <!-- begin-user-doc -->
163 * <!-- end-user-doc -->
164 * @generated
165 */
166 public Node getNewNode() {
167 return newNode;
168 }
169
170 /**
171 * <!-- begin-user-doc -->
172 * <!-- end-user-doc -->
173 * @generated
174 */
175 public NotificationChain basicSetNewNode(Node newNewNode, NotificationChain msgs) {
176 Node oldNewNode = newNode;
177 newNode = newNewNode;
178 if (eNotificationRequired()) {
179 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
180 ProblemPackage.CLASS_DECLARATION__NEW_NODE, oldNewNode, newNewNode);
181 if (msgs == null)
182 msgs = notification;
183 else
184 msgs.add(notification);
185 }
186 return msgs;
187 }
188
189 /**
190 * <!-- begin-user-doc -->
191 * <!-- end-user-doc -->
192 * @generated
193 */
194 public void setNewNode(Node newNewNode) {
195 if (newNewNode != newNode) {
196 NotificationChain msgs = null;
197 if (newNode != null)
198 msgs = ((InternalEObject) newNode).eInverseRemove(this,
199 EOPPOSITE_FEATURE_BASE - ProblemPackage.CLASS_DECLARATION__NEW_NODE, null, msgs);
200 if (newNewNode != null)
201 msgs = ((InternalEObject) newNewNode).eInverseAdd(this,
202 EOPPOSITE_FEATURE_BASE - ProblemPackage.CLASS_DECLARATION__NEW_NODE, null, msgs);
203 msgs = basicSetNewNode(newNewNode, msgs);
204 if (msgs != null)
205 msgs.dispatch();
206 } else if (eNotificationRequired())
207 eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.CLASS_DECLARATION__NEW_NODE,
208 newNewNode, newNewNode));
209 }
210
211 /**
212 * <!-- begin-user-doc -->
213 * <!-- end-user-doc -->
214 * @generated
215 */
216 @Override
217 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
218 switch (featureID) {
219 case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS:
220 return ((InternalEList<?>) getReferenceDeclarations()).basicRemove(otherEnd, msgs);
221 case ProblemPackage.CLASS_DECLARATION__NEW_NODE:
222 return basicSetNewNode(null, msgs);
223 }
224 return super.eInverseRemove(otherEnd, featureID, msgs);
225 }
226
227 /**
228 * <!-- begin-user-doc -->
229 * <!-- end-user-doc -->
230 * @generated
231 */
232 @Override
233 public Object eGet(int featureID, boolean resolve, boolean coreType) {
234 switch (featureID) {
235 case ProblemPackage.CLASS_DECLARATION__ABSTRACT:
236 return isAbstract();
237 case ProblemPackage.CLASS_DECLARATION__SUPER_TYPES:
238 return getSuperTypes();
239 case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS:
240 return getReferenceDeclarations();
241 case ProblemPackage.CLASS_DECLARATION__NEW_NODE:
242 return getNewNode();
243 }
244 return super.eGet(featureID, resolve, coreType);
245 }
246
247 /**
248 * <!-- begin-user-doc -->
249 * <!-- end-user-doc -->
250 * @generated
251 */
252 @SuppressWarnings("unchecked")
253 @Override
254 public void eSet(int featureID, Object newValue) {
255 switch (featureID) {
256 case ProblemPackage.CLASS_DECLARATION__ABSTRACT:
257 setAbstract((Boolean) newValue);
258 return;
259 case ProblemPackage.CLASS_DECLARATION__SUPER_TYPES:
260 getSuperTypes().clear();
261 getSuperTypes().addAll((Collection<? extends Relation>) newValue);
262 return;
263 case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS:
264 getReferenceDeclarations().clear();
265 getReferenceDeclarations().addAll((Collection<? extends ReferenceDeclaration>) newValue);
266 return;
267 case ProblemPackage.CLASS_DECLARATION__NEW_NODE:
268 setNewNode((Node) newValue);
269 return;
270 }
271 super.eSet(featureID, newValue);
272 }
273
274 /**
275 * <!-- begin-user-doc -->
276 * <!-- end-user-doc -->
277 * @generated
278 */
279 @Override
280 public void eUnset(int featureID) {
281 switch (featureID) {
282 case ProblemPackage.CLASS_DECLARATION__ABSTRACT:
283 setAbstract(ABSTRACT_EDEFAULT);
284 return;
285 case ProblemPackage.CLASS_DECLARATION__SUPER_TYPES:
286 getSuperTypes().clear();
287 return;
288 case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS:
289 getReferenceDeclarations().clear();
290 return;
291 case ProblemPackage.CLASS_DECLARATION__NEW_NODE:
292 setNewNode((Node) null);
293 return;
294 }
295 super.eUnset(featureID);
296 }
297
298 /**
299 * <!-- begin-user-doc -->
300 * <!-- end-user-doc -->
301 * @generated
302 */
303 @Override
304 public boolean eIsSet(int featureID) {
305 switch (featureID) {
306 case ProblemPackage.CLASS_DECLARATION__ABSTRACT:
307 return abstract_ != ABSTRACT_EDEFAULT;
308 case ProblemPackage.CLASS_DECLARATION__SUPER_TYPES:
309 return superTypes != null && !superTypes.isEmpty();
310 case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS:
311 return referenceDeclarations != null && !referenceDeclarations.isEmpty();
312 case ProblemPackage.CLASS_DECLARATION__NEW_NODE:
313 return newNode != null;
314 }
315 return super.eIsSet(featureID);
316 }
317
318 /**
319 * <!-- begin-user-doc -->
320 * <!-- end-user-doc -->
321 * @generated
322 */
323 @Override
324 public String toString() {
325 if (eIsProxy())
326 return super.toString();
327
328 StringBuilder result = new StringBuilder(super.toString());
329 result.append(" (abstract: ");
330 result.append(abstract_);
331 result.append(')');
332 return result.toString();
333 }
334
335} //ClassDeclarationImpl