diff options
author | Kristóf Marussy <marussy@mit.bme.hu> | 2020-06-25 19:55:10 +0200 |
---|---|---|
committer | Kristóf Marussy <marussy@mit.bme.hu> | 2020-06-25 19:55:10 +0200 |
commit | c3a6d4b9cf3657070d180aa65ddbf0459e880329 (patch) | |
tree | 780c4fc61578dcb309af53fb0c164c7627e51676 /Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalDataImpl.java | |
parent | New configuration language parser WIP (diff) | |
parent | Scope unsat benchmarks (diff) | |
download | VIATRA-Generator-c3a6d4b9cf3657070d180aa65ddbf0459e880329.tar.gz VIATRA-Generator-c3a6d4b9cf3657070d180aa65ddbf0459e880329.tar.zst VIATRA-Generator-c3a6d4b9cf3657070d180aa65ddbf0459e880329.zip |
Merge branch 'kris'
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalDataImpl.java')
-rw-r--r-- | Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalDataImpl.java | 270 |
1 files changed, 270 insertions, 0 deletions
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalDataImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalDataImpl.java new file mode 100644 index 00000000..50028019 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalDataImpl.java | |||
@@ -0,0 +1,270 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package functionalarchitecture.impl; | ||
4 | |||
5 | import functionalarchitecture.FAMTerminator; | ||
6 | import functionalarchitecture.FunctionalData; | ||
7 | import functionalarchitecture.FunctionalarchitecturePackage; | ||
8 | |||
9 | import org.eclipse.emf.common.notify.Notification; | ||
10 | import org.eclipse.emf.common.notify.NotificationChain; | ||
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 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
17 | |||
18 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
19 | |||
20 | /** | ||
21 | * <!-- begin-user-doc --> | ||
22 | * An implementation of the model object '<em><b>Functional Data</b></em>'. | ||
23 | * <!-- end-user-doc --> | ||
24 | * <p> | ||
25 | * The following features are implemented: | ||
26 | * </p> | ||
27 | * <ul> | ||
28 | * <li>{@link functionalarchitecture.impl.FunctionalDataImpl#getTerminator <em>Terminator</em>}</li> | ||
29 | * <li>{@link functionalarchitecture.impl.FunctionalDataImpl#getInterface <em>Interface</em>}</li> | ||
30 | * </ul> | ||
31 | * | ||
32 | * @generated | ||
33 | */ | ||
34 | public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container implements FunctionalData { | ||
35 | /** | ||
36 | * The cached value of the '{@link #getTerminator() <em>Terminator</em>}' containment reference. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @see #getTerminator() | ||
40 | * @generated | ||
41 | * @ordered | ||
42 | */ | ||
43 | protected FAMTerminator terminator; | ||
44 | |||
45 | /** | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @generated | ||
49 | */ | ||
50 | protected FunctionalDataImpl() { | ||
51 | super(); | ||
52 | } | ||
53 | |||
54 | /** | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @generated | ||
58 | */ | ||
59 | @Override | ||
60 | protected EClass eStaticClass() { | ||
61 | return FunctionalarchitecturePackage.Literals.FUNCTIONAL_DATA; | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @generated | ||
68 | */ | ||
69 | @Override | ||
70 | public FAMTerminator getTerminator() { | ||
71 | return terminator; | ||
72 | } | ||
73 | |||
74 | /** | ||
75 | * <!-- begin-user-doc --> | ||
76 | * <!-- end-user-doc --> | ||
77 | * @generated | ||
78 | */ | ||
79 | public NotificationChain basicSetTerminator(FAMTerminator newTerminator, NotificationChain msgs) { | ||
80 | FAMTerminator oldTerminator = terminator; | ||
81 | terminator = newTerminator; | ||
82 | if (eNotificationRequired()) { | ||
83 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR, oldTerminator, newTerminator); | ||
84 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
85 | } | ||
86 | return msgs; | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * <!-- begin-user-doc --> | ||
91 | * <!-- end-user-doc --> | ||
92 | * @generated | ||
93 | */ | ||
94 | @Override | ||
95 | public void setTerminator(FAMTerminator newTerminator) { | ||
96 | if (newTerminator != terminator) { | ||
97 | NotificationChain msgs = null; | ||
98 | if (terminator != null) | ||
99 | msgs = ((InternalEObject)terminator).eInverseRemove(this, FunctionalarchitecturePackage.FAM_TERMINATOR__DATA, FAMTerminator.class, msgs); | ||
100 | if (newTerminator != null) | ||
101 | msgs = ((InternalEObject)newTerminator).eInverseAdd(this, FunctionalarchitecturePackage.FAM_TERMINATOR__DATA, FAMTerminator.class, msgs); | ||
102 | msgs = basicSetTerminator(newTerminator, msgs); | ||
103 | if (msgs != null) msgs.dispatch(); | ||
104 | } | ||
105 | else if (eNotificationRequired()) | ||
106 | eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR, newTerminator, newTerminator)); | ||
107 | } | ||
108 | |||
109 | /** | ||
110 | * <!-- begin-user-doc --> | ||
111 | * <!-- end-user-doc --> | ||
112 | * @generated | ||
113 | */ | ||
114 | @Override | ||
115 | public functionalarchitecture.FunctionalInterface getInterface() { | ||
116 | if (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE) return null; | ||
117 | return (functionalarchitecture.FunctionalInterface)eInternalContainer(); | ||
118 | } | ||
119 | |||
120 | /** | ||
121 | * <!-- begin-user-doc --> | ||
122 | * <!-- end-user-doc --> | ||
123 | * @generated | ||
124 | */ | ||
125 | public NotificationChain basicSetInterface(functionalarchitecture.FunctionalInterface newInterface, NotificationChain msgs) { | ||
126 | msgs = eBasicSetContainer((InternalEObject)newInterface, FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE, msgs); | ||
127 | return msgs; | ||
128 | } | ||
129 | |||
130 | /** | ||
131 | * <!-- begin-user-doc --> | ||
132 | * <!-- end-user-doc --> | ||
133 | * @generated | ||
134 | */ | ||
135 | @Override | ||
136 | public void setInterface(functionalarchitecture.FunctionalInterface newInterface) { | ||
137 | if (newInterface != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE && newInterface != null)) { | ||
138 | if (EcoreUtil.isAncestor(this, newInterface)) | ||
139 | throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); | ||
140 | NotificationChain msgs = null; | ||
141 | if (eInternalContainer() != null) | ||
142 | msgs = eBasicRemoveFromContainer(msgs); | ||
143 | if (newInterface != null) | ||
144 | msgs = ((InternalEObject)newInterface).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA, functionalarchitecture.FunctionalInterface.class, msgs); | ||
145 | msgs = basicSetInterface(newInterface, msgs); | ||
146 | if (msgs != null) msgs.dispatch(); | ||
147 | } | ||
148 | else if (eNotificationRequired()) | ||
149 | eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE, newInterface, newInterface)); | ||
150 | } | ||
151 | |||
152 | /** | ||
153 | * <!-- begin-user-doc --> | ||
154 | * <!-- end-user-doc --> | ||
155 | * @generated | ||
156 | */ | ||
157 | @Override | ||
158 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
159 | switch (featureID) { | ||
160 | case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR: | ||
161 | if (terminator != null) | ||
162 | msgs = ((InternalEObject)terminator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR, null, msgs); | ||
163 | return basicSetTerminator((FAMTerminator)otherEnd, msgs); | ||
164 | case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: | ||
165 | if (eInternalContainer() != null) | ||
166 | msgs = eBasicRemoveFromContainer(msgs); | ||
167 | return basicSetInterface((functionalarchitecture.FunctionalInterface)otherEnd, msgs); | ||
168 | } | ||
169 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
170 | } | ||
171 | |||
172 | /** | ||
173 | * <!-- begin-user-doc --> | ||
174 | * <!-- end-user-doc --> | ||
175 | * @generated | ||
176 | */ | ||
177 | @Override | ||
178 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
179 | switch (featureID) { | ||
180 | case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR: | ||
181 | return basicSetTerminator(null, msgs); | ||
182 | case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: | ||
183 | return basicSetInterface(null, msgs); | ||
184 | } | ||
185 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
186 | } | ||
187 | |||
188 | /** | ||
189 | * <!-- begin-user-doc --> | ||
190 | * <!-- end-user-doc --> | ||
191 | * @generated | ||
192 | */ | ||
193 | @Override | ||
194 | public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { | ||
195 | switch (eContainerFeatureID()) { | ||
196 | case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: | ||
197 | return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA, functionalarchitecture.FunctionalInterface.class, msgs); | ||
198 | } | ||
199 | return super.eBasicRemoveFromContainerFeature(msgs); | ||
200 | } | ||
201 | |||
202 | /** | ||
203 | * <!-- begin-user-doc --> | ||
204 | * <!-- end-user-doc --> | ||
205 | * @generated | ||
206 | */ | ||
207 | @Override | ||
208 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
209 | switch (featureID) { | ||
210 | case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR: | ||
211 | return getTerminator(); | ||
212 | case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: | ||
213 | return getInterface(); | ||
214 | } | ||
215 | return super.eGet(featureID, resolve, coreType); | ||
216 | } | ||
217 | |||
218 | /** | ||
219 | * <!-- begin-user-doc --> | ||
220 | * <!-- end-user-doc --> | ||
221 | * @generated | ||
222 | */ | ||
223 | @Override | ||
224 | public void eSet(int featureID, Object newValue) { | ||
225 | switch (featureID) { | ||
226 | case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR: | ||
227 | setTerminator((FAMTerminator)newValue); | ||
228 | return; | ||
229 | case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: | ||
230 | setInterface((functionalarchitecture.FunctionalInterface)newValue); | ||
231 | return; | ||
232 | } | ||
233 | super.eSet(featureID, newValue); | ||
234 | } | ||
235 | |||
236 | /** | ||
237 | * <!-- begin-user-doc --> | ||
238 | * <!-- end-user-doc --> | ||
239 | * @generated | ||
240 | */ | ||
241 | @Override | ||
242 | public void eUnset(int featureID) { | ||
243 | switch (featureID) { | ||
244 | case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR: | ||
245 | setTerminator((FAMTerminator)null); | ||
246 | return; | ||
247 | case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: | ||
248 | setInterface((functionalarchitecture.FunctionalInterface)null); | ||
249 | return; | ||
250 | } | ||
251 | super.eUnset(featureID); | ||
252 | } | ||
253 | |||
254 | /** | ||
255 | * <!-- begin-user-doc --> | ||
256 | * <!-- end-user-doc --> | ||
257 | * @generated | ||
258 | */ | ||
259 | @Override | ||
260 | public boolean eIsSet(int featureID) { | ||
261 | switch (featureID) { | ||
262 | case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR: | ||
263 | return terminator != null; | ||
264 | case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: | ||
265 | return getInterface() != null; | ||
266 | } | ||
267 | return super.eIsSet(featureID); | ||
268 | } | ||
269 | |||
270 | } //FunctionalDataImpl | ||