diff options
author | 2021-06-25 17:12:45 +0200 | |
---|---|---|
committer | 2021-06-25 17:12:45 +0200 | |
commit | baba88758a0ea5f671ab4a2aeacec374bed938c4 (patch) | |
tree | 1be30230a0959ce8d22986d91b1ed2460a328148 /org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java | |
parent | Initial commit (diff) | |
download | refinery-baba88758a0ea5f671ab4a2aeacec374bed938c4.tar.gz refinery-baba88758a0ea5f671ab4a2aeacec374bed938c4.tar.zst refinery-baba88758a0ea5f671ab4a2aeacec374bed938c4.zip |
Add initial prototype
Diffstat (limited to 'org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java')
-rw-r--r-- | org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java | 260 |
1 files changed, 260 insertions, 0 deletions
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java new file mode 100644 index 00000000..e1d07071 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/ClassDeclarationImpl.java | |||
@@ -0,0 +1,260 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import java.util.Collection; | ||
6 | |||
7 | import org.eclipse.emf.common.notify.Notification; | ||
8 | import org.eclipse.emf.common.notify.NotificationChain; | ||
9 | |||
10 | import org.eclipse.emf.common.util.EList; | ||
11 | |||
12 | import org.eclipse.emf.ecore.EClass; | ||
13 | import org.eclipse.emf.ecore.InternalEObject; | ||
14 | |||
15 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
16 | |||
17 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
18 | import org.eclipse.emf.ecore.util.EObjectResolvingEList; | ||
19 | import org.eclipse.emf.ecore.util.InternalEList; | ||
20 | |||
21 | import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; | ||
22 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
23 | import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; | ||
24 | |||
25 | /** | ||
26 | * <!-- begin-user-doc --> | ||
27 | * An implementation of the model object '<em><b>Class Declaration</b></em>'. | ||
28 | * <!-- end-user-doc --> | ||
29 | * <p> | ||
30 | * The following features are implemented: | ||
31 | * </p> | ||
32 | * <ul> | ||
33 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ClassDeclarationImpl#isAbstract <em>Abstract</em>}</li> | ||
34 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ClassDeclarationImpl#getSuperTypes <em>Super Types</em>}</li> | ||
35 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.ClassDeclarationImpl#getReferenceDeclarations <em>Reference Declarations</em>}</li> | ||
36 | * </ul> | ||
37 | * | ||
38 | * @generated | ||
39 | */ | ||
40 | public class ClassDeclarationImpl extends RelationImpl implements ClassDeclaration { | ||
41 | /** | ||
42 | * The default value of the '{@link #isAbstract() <em>Abstract</em>}' attribute. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @see #isAbstract() | ||
46 | * @generated | ||
47 | * @ordered | ||
48 | */ | ||
49 | protected static final boolean ABSTRACT_EDEFAULT = false; | ||
50 | |||
51 | /** | ||
52 | * The cached value of the '{@link #isAbstract() <em>Abstract</em>}' attribute. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @see #isAbstract() | ||
56 | * @generated | ||
57 | * @ordered | ||
58 | */ | ||
59 | protected boolean abstract_ = ABSTRACT_EDEFAULT; | ||
60 | |||
61 | /** | ||
62 | * The cached value of the '{@link #getSuperTypes() <em>Super Types</em>}' reference list. | ||
63 | * <!-- begin-user-doc --> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @see #getSuperTypes() | ||
66 | * @generated | ||
67 | * @ordered | ||
68 | */ | ||
69 | protected EList<ClassDeclaration> superTypes; | ||
70 | |||
71 | /** | ||
72 | * The cached value of the '{@link #getReferenceDeclarations() <em>Reference Declarations</em>}' containment reference list. | ||
73 | * <!-- begin-user-doc --> | ||
74 | * <!-- end-user-doc --> | ||
75 | * @see #getReferenceDeclarations() | ||
76 | * @generated | ||
77 | * @ordered | ||
78 | */ | ||
79 | protected EList<ReferenceDeclaration> referenceDeclarations; | ||
80 | |||
81 | /** | ||
82 | * <!-- begin-user-doc --> | ||
83 | * <!-- end-user-doc --> | ||
84 | * @generated | ||
85 | */ | ||
86 | protected ClassDeclarationImpl() { | ||
87 | super(); | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * <!-- begin-user-doc --> | ||
92 | * <!-- end-user-doc --> | ||
93 | * @generated | ||
94 | */ | ||
95 | @Override | ||
96 | protected EClass eStaticClass() { | ||
97 | return ProblemPackage.Literals.CLASS_DECLARATION; | ||
98 | } | ||
99 | |||
100 | /** | ||
101 | * <!-- begin-user-doc --> | ||
102 | * <!-- end-user-doc --> | ||
103 | * @generated | ||
104 | */ | ||
105 | public boolean isAbstract() { | ||
106 | return abstract_; | ||
107 | } | ||
108 | |||
109 | /** | ||
110 | * <!-- begin-user-doc --> | ||
111 | * <!-- end-user-doc --> | ||
112 | * @generated | ||
113 | */ | ||
114 | public void setAbstract(boolean newAbstract) { | ||
115 | boolean oldAbstract = abstract_; | ||
116 | abstract_ = newAbstract; | ||
117 | if (eNotificationRequired()) | ||
118 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.CLASS_DECLARATION__ABSTRACT, | ||
119 | oldAbstract, abstract_)); | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | public EList<ClassDeclaration> getSuperTypes() { | ||
128 | if (superTypes == null) { | ||
129 | superTypes = new EObjectResolvingEList<ClassDeclaration>(ClassDeclaration.class, this, | ||
130 | ProblemPackage.CLASS_DECLARATION__SUPER_TYPES); | ||
131 | } | ||
132 | return superTypes; | ||
133 | } | ||
134 | |||
135 | /** | ||
136 | * <!-- begin-user-doc --> | ||
137 | * <!-- end-user-doc --> | ||
138 | * @generated | ||
139 | */ | ||
140 | public EList<ReferenceDeclaration> getReferenceDeclarations() { | ||
141 | if (referenceDeclarations == null) { | ||
142 | referenceDeclarations = new EObjectContainmentEList<ReferenceDeclaration>(ReferenceDeclaration.class, this, | ||
143 | ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS); | ||
144 | } | ||
145 | return referenceDeclarations; | ||
146 | } | ||
147 | |||
148 | /** | ||
149 | * <!-- begin-user-doc --> | ||
150 | * <!-- end-user-doc --> | ||
151 | * @generated | ||
152 | */ | ||
153 | @Override | ||
154 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
155 | switch (featureID) { | ||
156 | case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS: | ||
157 | return ((InternalEList<?>) getReferenceDeclarations()).basicRemove(otherEnd, msgs); | ||
158 | } | ||
159 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
160 | } | ||
161 | |||
162 | /** | ||
163 | * <!-- begin-user-doc --> | ||
164 | * <!-- end-user-doc --> | ||
165 | * @generated | ||
166 | */ | ||
167 | @Override | ||
168 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
169 | switch (featureID) { | ||
170 | case ProblemPackage.CLASS_DECLARATION__ABSTRACT: | ||
171 | return isAbstract(); | ||
172 | case ProblemPackage.CLASS_DECLARATION__SUPER_TYPES: | ||
173 | return getSuperTypes(); | ||
174 | case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS: | ||
175 | return getReferenceDeclarations(); | ||
176 | } | ||
177 | return super.eGet(featureID, resolve, coreType); | ||
178 | } | ||
179 | |||
180 | /** | ||
181 | * <!-- begin-user-doc --> | ||
182 | * <!-- end-user-doc --> | ||
183 | * @generated | ||
184 | */ | ||
185 | @SuppressWarnings("unchecked") | ||
186 | @Override | ||
187 | public void eSet(int featureID, Object newValue) { | ||
188 | switch (featureID) { | ||
189 | case ProblemPackage.CLASS_DECLARATION__ABSTRACT: | ||
190 | setAbstract((Boolean) newValue); | ||
191 | return; | ||
192 | case ProblemPackage.CLASS_DECLARATION__SUPER_TYPES: | ||
193 | getSuperTypes().clear(); | ||
194 | getSuperTypes().addAll((Collection<? extends ClassDeclaration>) newValue); | ||
195 | return; | ||
196 | case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS: | ||
197 | getReferenceDeclarations().clear(); | ||
198 | getReferenceDeclarations().addAll((Collection<? extends ReferenceDeclaration>) newValue); | ||
199 | return; | ||
200 | } | ||
201 | super.eSet(featureID, newValue); | ||
202 | } | ||
203 | |||
204 | /** | ||
205 | * <!-- begin-user-doc --> | ||
206 | * <!-- end-user-doc --> | ||
207 | * @generated | ||
208 | */ | ||
209 | @Override | ||
210 | public void eUnset(int featureID) { | ||
211 | switch (featureID) { | ||
212 | case ProblemPackage.CLASS_DECLARATION__ABSTRACT: | ||
213 | setAbstract(ABSTRACT_EDEFAULT); | ||
214 | return; | ||
215 | case ProblemPackage.CLASS_DECLARATION__SUPER_TYPES: | ||
216 | getSuperTypes().clear(); | ||
217 | return; | ||
218 | case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS: | ||
219 | getReferenceDeclarations().clear(); | ||
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 ProblemPackage.CLASS_DECLARATION__ABSTRACT: | ||
234 | return abstract_ != ABSTRACT_EDEFAULT; | ||
235 | case ProblemPackage.CLASS_DECLARATION__SUPER_TYPES: | ||
236 | return superTypes != null && !superTypes.isEmpty(); | ||
237 | case ProblemPackage.CLASS_DECLARATION__REFERENCE_DECLARATIONS: | ||
238 | return referenceDeclarations != null && !referenceDeclarations.isEmpty(); | ||
239 | } | ||
240 | return super.eIsSet(featureID); | ||
241 | } | ||
242 | |||
243 | /** | ||
244 | * <!-- begin-user-doc --> | ||
245 | * <!-- end-user-doc --> | ||
246 | * @generated | ||
247 | */ | ||
248 | @Override | ||
249 | public String toString() { | ||
250 | if (eIsProxy()) | ||
251 | return super.toString(); | ||
252 | |||
253 | StringBuilder result = new StringBuilder(super.toString()); | ||
254 | result.append(" (abstract: "); | ||
255 | result.append(abstract_); | ||
256 | result.append(')'); | ||
257 | return result.toString(); | ||
258 | } | ||
259 | |||
260 | } //ClassDeclarationImpl | ||