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