diff options
author | 2020-05-19 21:18:06 +0200 | |
---|---|---|
committer | 2020-05-19 21:18:06 +0200 | |
commit | b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b (patch) | |
tree | ad3222182065b8fac7d9b3d528c4efabf2aa0dd2 /Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ExternMetricDefinitionImpl.java | |
parent | Merge branch 'master' of github.com:viatra/VIATRA-Generator (diff) | |
download | VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.tar.gz VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.tar.zst VIATRA-Generator-b3c1c5b30ae8ea7ebad391c9250b4509d5a4cc9b.zip |
Config language WIP
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ExternMetricDefinitionImpl.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ExternMetricDefinitionImpl.java | 311 |
1 files changed, 311 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ExternMetricDefinitionImpl.java b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ExternMetricDefinitionImpl.java new file mode 100644 index 00000000..97c76273 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/ecore-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ExternMetricDefinitionImpl.java | |||
@@ -0,0 +1,311 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.21.0 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.solverLanguage.impl; | ||
5 | |||
6 | import org.eclipse.emf.common.notify.Notification; | ||
7 | import org.eclipse.emf.common.notify.NotificationChain; | ||
8 | |||
9 | import org.eclipse.emf.ecore.EClass; | ||
10 | import org.eclipse.emf.ecore.InternalEObject; | ||
11 | |||
12 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
13 | |||
14 | import org.eclipse.viatra.solver.language.solverLanguage.ArgumentList; | ||
15 | import org.eclipse.viatra.solver.language.solverLanguage.ExternMetricDefinition; | ||
16 | import org.eclipse.viatra.solver.language.solverLanguage.NamedElement; | ||
17 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | ||
18 | |||
19 | /** | ||
20 | * <!-- begin-user-doc --> | ||
21 | * An implementation of the model object '<em><b>Extern Metric Definition</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.solverLanguage.impl.ExternMetricDefinitionImpl#getType <em>Type</em>}</li> | ||
28 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.ExternMetricDefinitionImpl#getName <em>Name</em>}</li> | ||
29 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.ExternMetricDefinitionImpl#getArgumentList <em>Argument List</em>}</li> | ||
30 | * </ul> | ||
31 | * | ||
32 | * @generated | ||
33 | */ | ||
34 | public class ExternMetricDefinitionImpl extends StatementImpl implements ExternMetricDefinition { | ||
35 | /** | ||
36 | * The cached value of the '{@link #getType() <em>Type</em>}' reference. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @see #getType() | ||
40 | * @generated | ||
41 | * @ordered | ||
42 | */ | ||
43 | protected NamedElement type; | ||
44 | |||
45 | /** | ||
46 | * The default value of the '{@link #getName() <em>Name</em>}' attribute. | ||
47 | * <!-- begin-user-doc --> | ||
48 | * <!-- end-user-doc --> | ||
49 | * @see #getName() | ||
50 | * @generated | ||
51 | * @ordered | ||
52 | */ | ||
53 | protected static final String NAME_EDEFAULT = null; | ||
54 | |||
55 | /** | ||
56 | * The cached value of the '{@link #getName() <em>Name</em>}' attribute. | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @see #getName() | ||
60 | * @generated | ||
61 | * @ordered | ||
62 | */ | ||
63 | protected String name = NAME_EDEFAULT; | ||
64 | |||
65 | /** | ||
66 | * The cached value of the '{@link #getArgumentList() <em>Argument List</em>}' containment reference. | ||
67 | * <!-- begin-user-doc --> | ||
68 | * <!-- end-user-doc --> | ||
69 | * @see #getArgumentList() | ||
70 | * @generated | ||
71 | * @ordered | ||
72 | */ | ||
73 | protected ArgumentList argumentList; | ||
74 | |||
75 | /** | ||
76 | * <!-- begin-user-doc --> | ||
77 | * <!-- end-user-doc --> | ||
78 | * @generated | ||
79 | */ | ||
80 | protected ExternMetricDefinitionImpl() { | ||
81 | super(); | ||
82 | } | ||
83 | |||
84 | /** | ||
85 | * <!-- begin-user-doc --> | ||
86 | * <!-- end-user-doc --> | ||
87 | * @generated | ||
88 | */ | ||
89 | @Override | ||
90 | protected EClass eStaticClass() { | ||
91 | return SolverLanguagePackage.Literals.EXTERN_METRIC_DEFINITION; | ||
92 | } | ||
93 | |||
94 | /** | ||
95 | * <!-- begin-user-doc --> | ||
96 | * <!-- end-user-doc --> | ||
97 | * @generated | ||
98 | */ | ||
99 | @Override | ||
100 | public NamedElement getType() { | ||
101 | if (type != null && type.eIsProxy()) { | ||
102 | InternalEObject oldType = (InternalEObject)type; | ||
103 | type = (NamedElement)eResolveProxy(oldType); | ||
104 | if (type != oldType) { | ||
105 | if (eNotificationRequired()) | ||
106 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, SolverLanguagePackage.EXTERN_METRIC_DEFINITION__TYPE, oldType, type)); | ||
107 | } | ||
108 | } | ||
109 | return type; | ||
110 | } | ||
111 | |||
112 | /** | ||
113 | * <!-- begin-user-doc --> | ||
114 | * <!-- end-user-doc --> | ||
115 | * @generated | ||
116 | */ | ||
117 | public NamedElement basicGetType() { | ||
118 | return type; | ||
119 | } | ||
120 | |||
121 | /** | ||
122 | * <!-- begin-user-doc --> | ||
123 | * <!-- end-user-doc --> | ||
124 | * @generated | ||
125 | */ | ||
126 | @Override | ||
127 | public void setType(NamedElement newType) { | ||
128 | NamedElement oldType = type; | ||
129 | type = newType; | ||
130 | if (eNotificationRequired()) | ||
131 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.EXTERN_METRIC_DEFINITION__TYPE, oldType, type)); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | */ | ||
139 | @Override | ||
140 | public String getName() { | ||
141 | return name; | ||
142 | } | ||
143 | |||
144 | /** | ||
145 | * <!-- begin-user-doc --> | ||
146 | * <!-- end-user-doc --> | ||
147 | * @generated | ||
148 | */ | ||
149 | @Override | ||
150 | public void setName(String newName) { | ||
151 | String oldName = name; | ||
152 | name = newName; | ||
153 | if (eNotificationRequired()) | ||
154 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.EXTERN_METRIC_DEFINITION__NAME, oldName, name)); | ||
155 | } | ||
156 | |||
157 | /** | ||
158 | * <!-- begin-user-doc --> | ||
159 | * <!-- end-user-doc --> | ||
160 | * @generated | ||
161 | */ | ||
162 | @Override | ||
163 | public ArgumentList getArgumentList() { | ||
164 | return argumentList; | ||
165 | } | ||
166 | |||
167 | /** | ||
168 | * <!-- begin-user-doc --> | ||
169 | * <!-- end-user-doc --> | ||
170 | * @generated | ||
171 | */ | ||
172 | public NotificationChain basicSetArgumentList(ArgumentList newArgumentList, NotificationChain msgs) { | ||
173 | ArgumentList oldArgumentList = argumentList; | ||
174 | argumentList = newArgumentList; | ||
175 | if (eNotificationRequired()) { | ||
176 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.EXTERN_METRIC_DEFINITION__ARGUMENT_LIST, oldArgumentList, newArgumentList); | ||
177 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
178 | } | ||
179 | return msgs; | ||
180 | } | ||
181 | |||
182 | /** | ||
183 | * <!-- begin-user-doc --> | ||
184 | * <!-- end-user-doc --> | ||
185 | * @generated | ||
186 | */ | ||
187 | @Override | ||
188 | public void setArgumentList(ArgumentList newArgumentList) { | ||
189 | if (newArgumentList != argumentList) { | ||
190 | NotificationChain msgs = null; | ||
191 | if (argumentList != null) | ||
192 | msgs = ((InternalEObject)argumentList).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.EXTERN_METRIC_DEFINITION__ARGUMENT_LIST, null, msgs); | ||
193 | if (newArgumentList != null) | ||
194 | msgs = ((InternalEObject)newArgumentList).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.EXTERN_METRIC_DEFINITION__ARGUMENT_LIST, null, msgs); | ||
195 | msgs = basicSetArgumentList(newArgumentList, msgs); | ||
196 | if (msgs != null) msgs.dispatch(); | ||
197 | } | ||
198 | else if (eNotificationRequired()) | ||
199 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.EXTERN_METRIC_DEFINITION__ARGUMENT_LIST, newArgumentList, newArgumentList)); | ||
200 | } | ||
201 | |||
202 | /** | ||
203 | * <!-- begin-user-doc --> | ||
204 | * <!-- end-user-doc --> | ||
205 | * @generated | ||
206 | */ | ||
207 | @Override | ||
208 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
209 | switch (featureID) { | ||
210 | case SolverLanguagePackage.EXTERN_METRIC_DEFINITION__ARGUMENT_LIST: | ||
211 | return basicSetArgumentList(null, msgs); | ||
212 | } | ||
213 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
214 | } | ||
215 | |||
216 | /** | ||
217 | * <!-- begin-user-doc --> | ||
218 | * <!-- end-user-doc --> | ||
219 | * @generated | ||
220 | */ | ||
221 | @Override | ||
222 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
223 | switch (featureID) { | ||
224 | case SolverLanguagePackage.EXTERN_METRIC_DEFINITION__TYPE: | ||
225 | if (resolve) return getType(); | ||
226 | return basicGetType(); | ||
227 | case SolverLanguagePackage.EXTERN_METRIC_DEFINITION__NAME: | ||
228 | return getName(); | ||
229 | case SolverLanguagePackage.EXTERN_METRIC_DEFINITION__ARGUMENT_LIST: | ||
230 | return getArgumentList(); | ||
231 | } | ||
232 | return super.eGet(featureID, resolve, coreType); | ||
233 | } | ||
234 | |||
235 | /** | ||
236 | * <!-- begin-user-doc --> | ||
237 | * <!-- end-user-doc --> | ||
238 | * @generated | ||
239 | */ | ||
240 | @Override | ||
241 | public void eSet(int featureID, Object newValue) { | ||
242 | switch (featureID) { | ||
243 | case SolverLanguagePackage.EXTERN_METRIC_DEFINITION__TYPE: | ||
244 | setType((NamedElement)newValue); | ||
245 | return; | ||
246 | case SolverLanguagePackage.EXTERN_METRIC_DEFINITION__NAME: | ||
247 | setName((String)newValue); | ||
248 | return; | ||
249 | case SolverLanguagePackage.EXTERN_METRIC_DEFINITION__ARGUMENT_LIST: | ||
250 | setArgumentList((ArgumentList)newValue); | ||
251 | return; | ||
252 | } | ||
253 | super.eSet(featureID, newValue); | ||
254 | } | ||
255 | |||
256 | /** | ||
257 | * <!-- begin-user-doc --> | ||
258 | * <!-- end-user-doc --> | ||
259 | * @generated | ||
260 | */ | ||
261 | @Override | ||
262 | public void eUnset(int featureID) { | ||
263 | switch (featureID) { | ||
264 | case SolverLanguagePackage.EXTERN_METRIC_DEFINITION__TYPE: | ||
265 | setType((NamedElement)null); | ||
266 | return; | ||
267 | case SolverLanguagePackage.EXTERN_METRIC_DEFINITION__NAME: | ||
268 | setName(NAME_EDEFAULT); | ||
269 | return; | ||
270 | case SolverLanguagePackage.EXTERN_METRIC_DEFINITION__ARGUMENT_LIST: | ||
271 | setArgumentList((ArgumentList)null); | ||
272 | return; | ||
273 | } | ||
274 | super.eUnset(featureID); | ||
275 | } | ||
276 | |||
277 | /** | ||
278 | * <!-- begin-user-doc --> | ||
279 | * <!-- end-user-doc --> | ||
280 | * @generated | ||
281 | */ | ||
282 | @Override | ||
283 | public boolean eIsSet(int featureID) { | ||
284 | switch (featureID) { | ||
285 | case SolverLanguagePackage.EXTERN_METRIC_DEFINITION__TYPE: | ||
286 | return type != null; | ||
287 | case SolverLanguagePackage.EXTERN_METRIC_DEFINITION__NAME: | ||
288 | return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); | ||
289 | case SolverLanguagePackage.EXTERN_METRIC_DEFINITION__ARGUMENT_LIST: | ||
290 | return argumentList != 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 | 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 | } //ExternMetricDefinitionImpl | ||