diff options
author | Kristóf Marussy <kristof@marussy.com> | 2021-06-27 23:21:42 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2021-06-27 23:30:25 +0200 |
commit | 7febe0b4781c5bb0fab34895ad642040ae143a8b (patch) | |
tree | 5bc49f9195b18a938382f2527ee4ab273527a07a /language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeValueAssertionImpl.java | |
parent | Electric semicolons (diff) | |
download | refinery-7febe0b4781c5bb0fab34895ad642040ae143a8b.tar.gz refinery-7febe0b4781c5bb0fab34895ad642040ae143a8b.tar.zst refinery-7febe0b4781c5bb0fab34895ad642040ae143a8b.zip |
Add data constant support
Diffstat (limited to 'language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeValueAssertionImpl.java')
-rw-r--r-- | language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeValueAssertionImpl.java | 247 |
1 files changed, 247 insertions, 0 deletions
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeValueAssertionImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeValueAssertionImpl.java new file mode 100644 index 00000000..0078b35e --- /dev/null +++ b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/NodeValueAssertionImpl.java | |||
@@ -0,0 +1,247 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | import org.eclipse.emf.common.notify.NotificationChain; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | import org.eclipse.emf.ecore.InternalEObject; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
12 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
13 | |||
14 | import org.eclipse.viatra.solver.language.model.problem.Constant; | ||
15 | import org.eclipse.viatra.solver.language.model.problem.Node; | ||
16 | import org.eclipse.viatra.solver.language.model.problem.NodeValueAssertion; | ||
17 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
18 | |||
19 | /** | ||
20 | * <!-- begin-user-doc --> | ||
21 | * An implementation of the model object '<em><b>Node Value Assertion</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.model.problem.impl.NodeValueAssertionImpl#getNode <em>Node</em>}</li> | ||
28 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.NodeValueAssertionImpl#getValue <em>Value</em>}</li> | ||
29 | * </ul> | ||
30 | * | ||
31 | * @generated | ||
32 | */ | ||
33 | public class NodeValueAssertionImpl extends MinimalEObjectImpl.Container implements NodeValueAssertion { | ||
34 | /** | ||
35 | * The cached value of the '{@link #getNode() <em>Node</em>}' reference. | ||
36 | * <!-- begin-user-doc --> | ||
37 | * <!-- end-user-doc --> | ||
38 | * @see #getNode() | ||
39 | * @generated | ||
40 | * @ordered | ||
41 | */ | ||
42 | protected Node node; | ||
43 | |||
44 | /** | ||
45 | * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference. | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @see #getValue() | ||
49 | * @generated | ||
50 | * @ordered | ||
51 | */ | ||
52 | protected Constant value; | ||
53 | |||
54 | /** | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @generated | ||
58 | */ | ||
59 | protected NodeValueAssertionImpl() { | ||
60 | super(); | ||
61 | } | ||
62 | |||
63 | /** | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @generated | ||
67 | */ | ||
68 | @Override | ||
69 | protected EClass eStaticClass() { | ||
70 | return ProblemPackage.Literals.NODE_VALUE_ASSERTION; | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @generated | ||
77 | */ | ||
78 | public Node getNode() { | ||
79 | if (node != null && node.eIsProxy()) { | ||
80 | InternalEObject oldNode = (InternalEObject) node; | ||
81 | node = (Node) eResolveProxy(oldNode); | ||
82 | if (node != oldNode) { | ||
83 | if (eNotificationRequired()) | ||
84 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProblemPackage.NODE_VALUE_ASSERTION__NODE, | ||
85 | oldNode, node)); | ||
86 | } | ||
87 | } | ||
88 | return node; | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | public Node basicGetNode() { | ||
97 | return node; | ||
98 | } | ||
99 | |||
100 | /** | ||
101 | * <!-- begin-user-doc --> | ||
102 | * <!-- end-user-doc --> | ||
103 | * @generated | ||
104 | */ | ||
105 | public void setNode(Node newNode) { | ||
106 | Node oldNode = node; | ||
107 | node = newNode; | ||
108 | if (eNotificationRequired()) | ||
109 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.NODE_VALUE_ASSERTION__NODE, oldNode, | ||
110 | node)); | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * <!-- begin-user-doc --> | ||
115 | * <!-- end-user-doc --> | ||
116 | * @generated | ||
117 | */ | ||
118 | public Constant getValue() { | ||
119 | return value; | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | public NotificationChain basicSetValue(Constant newValue, NotificationChain msgs) { | ||
128 | Constant oldValue = value; | ||
129 | value = newValue; | ||
130 | if (eNotificationRequired()) { | ||
131 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, | ||
132 | ProblemPackage.NODE_VALUE_ASSERTION__VALUE, oldValue, newValue); | ||
133 | if (msgs == null) | ||
134 | msgs = notification; | ||
135 | else | ||
136 | msgs.add(notification); | ||
137 | } | ||
138 | return msgs; | ||
139 | } | ||
140 | |||
141 | /** | ||
142 | * <!-- begin-user-doc --> | ||
143 | * <!-- end-user-doc --> | ||
144 | * @generated | ||
145 | */ | ||
146 | public void setValue(Constant newValue) { | ||
147 | if (newValue != value) { | ||
148 | NotificationChain msgs = null; | ||
149 | if (value != null) | ||
150 | msgs = ((InternalEObject) value).eInverseRemove(this, | ||
151 | EOPPOSITE_FEATURE_BASE - ProblemPackage.NODE_VALUE_ASSERTION__VALUE, null, msgs); | ||
152 | if (newValue != null) | ||
153 | msgs = ((InternalEObject) newValue).eInverseAdd(this, | ||
154 | EOPPOSITE_FEATURE_BASE - ProblemPackage.NODE_VALUE_ASSERTION__VALUE, null, msgs); | ||
155 | msgs = basicSetValue(newValue, msgs); | ||
156 | if (msgs != null) | ||
157 | msgs.dispatch(); | ||
158 | } else if (eNotificationRequired()) | ||
159 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.NODE_VALUE_ASSERTION__VALUE, newValue, | ||
160 | newValue)); | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * <!-- begin-user-doc --> | ||
165 | * <!-- end-user-doc --> | ||
166 | * @generated | ||
167 | */ | ||
168 | @Override | ||
169 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
170 | switch (featureID) { | ||
171 | case ProblemPackage.NODE_VALUE_ASSERTION__VALUE: | ||
172 | return basicSetValue(null, msgs); | ||
173 | } | ||
174 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
175 | } | ||
176 | |||
177 | /** | ||
178 | * <!-- begin-user-doc --> | ||
179 | * <!-- end-user-doc --> | ||
180 | * @generated | ||
181 | */ | ||
182 | @Override | ||
183 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
184 | switch (featureID) { | ||
185 | case ProblemPackage.NODE_VALUE_ASSERTION__NODE: | ||
186 | if (resolve) | ||
187 | return getNode(); | ||
188 | return basicGetNode(); | ||
189 | case ProblemPackage.NODE_VALUE_ASSERTION__VALUE: | ||
190 | return getValue(); | ||
191 | } | ||
192 | return super.eGet(featureID, resolve, coreType); | ||
193 | } | ||
194 | |||
195 | /** | ||
196 | * <!-- begin-user-doc --> | ||
197 | * <!-- end-user-doc --> | ||
198 | * @generated | ||
199 | */ | ||
200 | @Override | ||
201 | public void eSet(int featureID, Object newValue) { | ||
202 | switch (featureID) { | ||
203 | case ProblemPackage.NODE_VALUE_ASSERTION__NODE: | ||
204 | setNode((Node) newValue); | ||
205 | return; | ||
206 | case ProblemPackage.NODE_VALUE_ASSERTION__VALUE: | ||
207 | setValue((Constant) newValue); | ||
208 | return; | ||
209 | } | ||
210 | super.eSet(featureID, newValue); | ||
211 | } | ||
212 | |||
213 | /** | ||
214 | * <!-- begin-user-doc --> | ||
215 | * <!-- end-user-doc --> | ||
216 | * @generated | ||
217 | */ | ||
218 | @Override | ||
219 | public void eUnset(int featureID) { | ||
220 | switch (featureID) { | ||
221 | case ProblemPackage.NODE_VALUE_ASSERTION__NODE: | ||
222 | setNode((Node) null); | ||
223 | return; | ||
224 | case ProblemPackage.NODE_VALUE_ASSERTION__VALUE: | ||
225 | setValue((Constant) null); | ||
226 | return; | ||
227 | } | ||
228 | super.eUnset(featureID); | ||
229 | } | ||
230 | |||
231 | /** | ||
232 | * <!-- begin-user-doc --> | ||
233 | * <!-- end-user-doc --> | ||
234 | * @generated | ||
235 | */ | ||
236 | @Override | ||
237 | public boolean eIsSet(int featureID) { | ||
238 | switch (featureID) { | ||
239 | case ProblemPackage.NODE_VALUE_ASSERTION__NODE: | ||
240 | return node != null; | ||
241 | case ProblemPackage.NODE_VALUE_ASSERTION__VALUE: | ||
242 | return value != null; | ||
243 | } | ||
244 | return super.eIsSet(featureID); | ||
245 | } | ||
246 | |||
247 | } //NodeValueAssertionImpl | ||