diff options
Diffstat (limited to 'Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSAnnotationImpl.java')
-rw-r--r-- | Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSAnnotationImpl.java | 311 |
1 files changed, 311 insertions, 0 deletions
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSAnnotationImpl.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSAnnotationImpl.java new file mode 100644 index 00000000..b55f087b --- /dev/null +++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSAnnotationImpl.java | |||
@@ -0,0 +1,311 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.14.0 | ||
3 | */ | ||
4 | package ca.mcgill.ecse.dslreasoner.vampireLanguage.impl; | ||
5 | |||
6 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSAnnotation; | ||
7 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage; | ||
8 | |||
9 | import java.util.Collection; | ||
10 | |||
11 | import org.eclipse.emf.common.notify.Notification; | ||
12 | import org.eclipse.emf.common.notify.NotificationChain; | ||
13 | |||
14 | import org.eclipse.emf.common.util.EList; | ||
15 | |||
16 | import org.eclipse.emf.ecore.EClass; | ||
17 | import org.eclipse.emf.ecore.InternalEObject; | ||
18 | |||
19 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
20 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
21 | |||
22 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
23 | import org.eclipse.emf.ecore.util.InternalEList; | ||
24 | |||
25 | /** | ||
26 | * <!-- begin-user-doc --> | ||
27 | * An implementation of the model object '<em><b>VLS Annotation</b></em>'. | ||
28 | * <!-- end-user-doc --> | ||
29 | * <p> | ||
30 | * The following features are implemented: | ||
31 | * </p> | ||
32 | * <ul> | ||
33 | * <li>{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.impl.VLSAnnotationImpl#getName <em>Name</em>}</li> | ||
34 | * <li>{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.impl.VLSAnnotationImpl#getFollowup <em>Followup</em>}</li> | ||
35 | * <li>{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.impl.VLSAnnotationImpl#getTerms <em>Terms</em>}</li> | ||
36 | * </ul> | ||
37 | * | ||
38 | * @generated | ||
39 | */ | ||
40 | public class VLSAnnotationImpl extends MinimalEObjectImpl.Container implements VLSAnnotation | ||
41 | { | ||
42 | /** | ||
43 | * The default value of the '{@link #getName() <em>Name</em>}' attribute. | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @see #getName() | ||
47 | * @generated | ||
48 | * @ordered | ||
49 | */ | ||
50 | protected static final String NAME_EDEFAULT = null; | ||
51 | |||
52 | /** | ||
53 | * The cached value of the '{@link #getName() <em>Name</em>}' attribute. | ||
54 | * <!-- begin-user-doc --> | ||
55 | * <!-- end-user-doc --> | ||
56 | * @see #getName() | ||
57 | * @generated | ||
58 | * @ordered | ||
59 | */ | ||
60 | protected String name = NAME_EDEFAULT; | ||
61 | |||
62 | /** | ||
63 | * The cached value of the '{@link #getFollowup() <em>Followup</em>}' containment reference. | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @see #getFollowup() | ||
67 | * @generated | ||
68 | * @ordered | ||
69 | */ | ||
70 | protected VLSAnnotation followup; | ||
71 | |||
72 | /** | ||
73 | * The cached value of the '{@link #getTerms() <em>Terms</em>}' containment reference list. | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @see #getTerms() | ||
77 | * @generated | ||
78 | * @ordered | ||
79 | */ | ||
80 | protected EList<VLSAnnotation> terms; | ||
81 | |||
82 | /** | ||
83 | * <!-- begin-user-doc --> | ||
84 | * <!-- end-user-doc --> | ||
85 | * @generated | ||
86 | */ | ||
87 | protected VLSAnnotationImpl() | ||
88 | { | ||
89 | super(); | ||
90 | } | ||
91 | |||
92 | /** | ||
93 | * <!-- begin-user-doc --> | ||
94 | * <!-- end-user-doc --> | ||
95 | * @generated | ||
96 | */ | ||
97 | @Override | ||
98 | protected EClass eStaticClass() | ||
99 | { | ||
100 | return VampireLanguagePackage.Literals.VLS_ANNOTATION; | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | public String getName() | ||
109 | { | ||
110 | return name; | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * <!-- begin-user-doc --> | ||
115 | * <!-- end-user-doc --> | ||
116 | * @generated | ||
117 | */ | ||
118 | public void setName(String newName) | ||
119 | { | ||
120 | String oldName = name; | ||
121 | name = newName; | ||
122 | if (eNotificationRequired()) | ||
123 | eNotify(new ENotificationImpl(this, Notification.SET, VampireLanguagePackage.VLS_ANNOTATION__NAME, oldName, name)); | ||
124 | } | ||
125 | |||
126 | /** | ||
127 | * <!-- begin-user-doc --> | ||
128 | * <!-- end-user-doc --> | ||
129 | * @generated | ||
130 | */ | ||
131 | public VLSAnnotation getFollowup() | ||
132 | { | ||
133 | return followup; | ||
134 | } | ||
135 | |||
136 | /** | ||
137 | * <!-- begin-user-doc --> | ||
138 | * <!-- end-user-doc --> | ||
139 | * @generated | ||
140 | */ | ||
141 | public NotificationChain basicSetFollowup(VLSAnnotation newFollowup, NotificationChain msgs) | ||
142 | { | ||
143 | VLSAnnotation oldFollowup = followup; | ||
144 | followup = newFollowup; | ||
145 | if (eNotificationRequired()) | ||
146 | { | ||
147 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, VampireLanguagePackage.VLS_ANNOTATION__FOLLOWUP, oldFollowup, newFollowup); | ||
148 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
149 | } | ||
150 | return msgs; | ||
151 | } | ||
152 | |||
153 | /** | ||
154 | * <!-- begin-user-doc --> | ||
155 | * <!-- end-user-doc --> | ||
156 | * @generated | ||
157 | */ | ||
158 | public void setFollowup(VLSAnnotation newFollowup) | ||
159 | { | ||
160 | if (newFollowup != followup) | ||
161 | { | ||
162 | NotificationChain msgs = null; | ||
163 | if (followup != null) | ||
164 | msgs = ((InternalEObject)followup).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - VampireLanguagePackage.VLS_ANNOTATION__FOLLOWUP, null, msgs); | ||
165 | if (newFollowup != null) | ||
166 | msgs = ((InternalEObject)newFollowup).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - VampireLanguagePackage.VLS_ANNOTATION__FOLLOWUP, null, msgs); | ||
167 | msgs = basicSetFollowup(newFollowup, msgs); | ||
168 | if (msgs != null) msgs.dispatch(); | ||
169 | } | ||
170 | else if (eNotificationRequired()) | ||
171 | eNotify(new ENotificationImpl(this, Notification.SET, VampireLanguagePackage.VLS_ANNOTATION__FOLLOWUP, newFollowup, newFollowup)); | ||
172 | } | ||
173 | |||
174 | /** | ||
175 | * <!-- begin-user-doc --> | ||
176 | * <!-- end-user-doc --> | ||
177 | * @generated | ||
178 | */ | ||
179 | public EList<VLSAnnotation> getTerms() | ||
180 | { | ||
181 | if (terms == null) | ||
182 | { | ||
183 | terms = new EObjectContainmentEList<VLSAnnotation>(VLSAnnotation.class, this, VampireLanguagePackage.VLS_ANNOTATION__TERMS); | ||
184 | } | ||
185 | return terms; | ||
186 | } | ||
187 | |||
188 | /** | ||
189 | * <!-- begin-user-doc --> | ||
190 | * <!-- end-user-doc --> | ||
191 | * @generated | ||
192 | */ | ||
193 | @Override | ||
194 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) | ||
195 | { | ||
196 | switch (featureID) | ||
197 | { | ||
198 | case VampireLanguagePackage.VLS_ANNOTATION__FOLLOWUP: | ||
199 | return basicSetFollowup(null, msgs); | ||
200 | case VampireLanguagePackage.VLS_ANNOTATION__TERMS: | ||
201 | return ((InternalEList<?>)getTerms()).basicRemove(otherEnd, msgs); | ||
202 | } | ||
203 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
204 | } | ||
205 | |||
206 | /** | ||
207 | * <!-- begin-user-doc --> | ||
208 | * <!-- end-user-doc --> | ||
209 | * @generated | ||
210 | */ | ||
211 | @Override | ||
212 | public Object eGet(int featureID, boolean resolve, boolean coreType) | ||
213 | { | ||
214 | switch (featureID) | ||
215 | { | ||
216 | case VampireLanguagePackage.VLS_ANNOTATION__NAME: | ||
217 | return getName(); | ||
218 | case VampireLanguagePackage.VLS_ANNOTATION__FOLLOWUP: | ||
219 | return getFollowup(); | ||
220 | case VampireLanguagePackage.VLS_ANNOTATION__TERMS: | ||
221 | return getTerms(); | ||
222 | } | ||
223 | return super.eGet(featureID, resolve, coreType); | ||
224 | } | ||
225 | |||
226 | /** | ||
227 | * <!-- begin-user-doc --> | ||
228 | * <!-- end-user-doc --> | ||
229 | * @generated | ||
230 | */ | ||
231 | @SuppressWarnings("unchecked") | ||
232 | @Override | ||
233 | public void eSet(int featureID, Object newValue) | ||
234 | { | ||
235 | switch (featureID) | ||
236 | { | ||
237 | case VampireLanguagePackage.VLS_ANNOTATION__NAME: | ||
238 | setName((String)newValue); | ||
239 | return; | ||
240 | case VampireLanguagePackage.VLS_ANNOTATION__FOLLOWUP: | ||
241 | setFollowup((VLSAnnotation)newValue); | ||
242 | return; | ||
243 | case VampireLanguagePackage.VLS_ANNOTATION__TERMS: | ||
244 | getTerms().clear(); | ||
245 | getTerms().addAll((Collection<? extends VLSAnnotation>)newValue); | ||
246 | return; | ||
247 | } | ||
248 | super.eSet(featureID, newValue); | ||
249 | } | ||
250 | |||
251 | /** | ||
252 | * <!-- begin-user-doc --> | ||
253 | * <!-- end-user-doc --> | ||
254 | * @generated | ||
255 | */ | ||
256 | @Override | ||
257 | public void eUnset(int featureID) | ||
258 | { | ||
259 | switch (featureID) | ||
260 | { | ||
261 | case VampireLanguagePackage.VLS_ANNOTATION__NAME: | ||
262 | setName(NAME_EDEFAULT); | ||
263 | return; | ||
264 | case VampireLanguagePackage.VLS_ANNOTATION__FOLLOWUP: | ||
265 | setFollowup((VLSAnnotation)null); | ||
266 | return; | ||
267 | case VampireLanguagePackage.VLS_ANNOTATION__TERMS: | ||
268 | getTerms().clear(); | ||
269 | return; | ||
270 | } | ||
271 | super.eUnset(featureID); | ||
272 | } | ||
273 | |||
274 | /** | ||
275 | * <!-- begin-user-doc --> | ||
276 | * <!-- end-user-doc --> | ||
277 | * @generated | ||
278 | */ | ||
279 | @Override | ||
280 | public boolean eIsSet(int featureID) | ||
281 | { | ||
282 | switch (featureID) | ||
283 | { | ||
284 | case VampireLanguagePackage.VLS_ANNOTATION__NAME: | ||
285 | return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); | ||
286 | case VampireLanguagePackage.VLS_ANNOTATION__FOLLOWUP: | ||
287 | return followup != null; | ||
288 | case VampireLanguagePackage.VLS_ANNOTATION__TERMS: | ||
289 | return terms != null && !terms.isEmpty(); | ||
290 | } | ||
291 | return super.eIsSet(featureID); | ||
292 | } | ||
293 | |||
294 | /** | ||
295 | * <!-- begin-user-doc --> | ||
296 | * <!-- end-user-doc --> | ||
297 | * @generated | ||
298 | */ | ||
299 | @Override | ||
300 | public String toString() | ||
301 | { | ||
302 | if (eIsProxy()) return super.toString(); | ||
303 | |||
304 | StringBuilder result = new StringBuilder(super.toString()); | ||
305 | result.append(" (name: "); | ||
306 | result.append(name); | ||
307 | result.append(')'); | ||
308 | return result.toString(); | ||
309 | } | ||
310 | |||
311 | } //VLSAnnotationImpl | ||