diff options
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/FunctionImpl.java')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/FunctionImpl.java | 273 |
1 files changed, 273 insertions, 0 deletions
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/FunctionImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/FunctionImpl.java new file mode 100644 index 00000000..da85ae54 --- /dev/null +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/FunctionImpl.java | |||
@@ -0,0 +1,273 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Function; | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage; | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeReference; | ||
8 | |||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.FunctionAnnotation; | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage; | ||
11 | import java.util.Collection; | ||
12 | |||
13 | import org.eclipse.emf.common.notify.Notification; | ||
14 | import org.eclipse.emf.common.notify.NotificationChain; | ||
15 | |||
16 | import org.eclipse.emf.common.util.EList; | ||
17 | |||
18 | import org.eclipse.emf.ecore.EClass; | ||
19 | import org.eclipse.emf.ecore.InternalEObject; | ||
20 | |||
21 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
22 | |||
23 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
24 | import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; | ||
25 | import org.eclipse.emf.ecore.util.InternalEList; | ||
26 | |||
27 | /** | ||
28 | * <!-- begin-user-doc --> | ||
29 | * An implementation of the model object '<em><b>Function</b></em>'. | ||
30 | * <!-- end-user-doc --> | ||
31 | * <p> | ||
32 | * The following features are implemented: | ||
33 | * </p> | ||
34 | * <ul> | ||
35 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.FunctionImpl#getRange <em>Range</em>}</li> | ||
36 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.FunctionImpl#getParameters <em>Parameters</em>}</li> | ||
37 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.FunctionImpl#getAnnotations <em>Annotations</em>}</li> | ||
38 | * </ul> | ||
39 | * | ||
40 | * @generated | ||
41 | */ | ||
42 | public abstract class FunctionImpl extends SymbolicDeclarationImpl implements Function { | ||
43 | /** | ||
44 | * The cached value of the '{@link #getRange() <em>Range</em>}' containment reference. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @see #getRange() | ||
48 | * @generated | ||
49 | * @ordered | ||
50 | */ | ||
51 | protected TypeReference range; | ||
52 | |||
53 | /** | ||
54 | * The cached value of the '{@link #getParameters() <em>Parameters</em>}' containment reference list. | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @see #getParameters() | ||
58 | * @generated | ||
59 | * @ordered | ||
60 | */ | ||
61 | protected EList<TypeReference> parameters; | ||
62 | |||
63 | /** | ||
64 | * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' reference list. | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @see #getAnnotations() | ||
68 | * @generated | ||
69 | * @ordered | ||
70 | */ | ||
71 | protected EList<FunctionAnnotation> annotations; | ||
72 | |||
73 | /** | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @generated | ||
77 | */ | ||
78 | protected FunctionImpl() { | ||
79 | super(); | ||
80 | } | ||
81 | |||
82 | /** | ||
83 | * <!-- begin-user-doc --> | ||
84 | * <!-- end-user-doc --> | ||
85 | * @generated | ||
86 | */ | ||
87 | @Override | ||
88 | protected EClass eStaticClass() { | ||
89 | return LogiclanguagePackage.Literals.FUNCTION; | ||
90 | } | ||
91 | |||
92 | /** | ||
93 | * <!-- begin-user-doc --> | ||
94 | * <!-- end-user-doc --> | ||
95 | * @generated | ||
96 | */ | ||
97 | public TypeReference getRange() { | ||
98 | return range; | ||
99 | } | ||
100 | |||
101 | /** | ||
102 | * <!-- begin-user-doc --> | ||
103 | * <!-- end-user-doc --> | ||
104 | * @generated | ||
105 | */ | ||
106 | public NotificationChain basicSetRange(TypeReference newRange, NotificationChain msgs) { | ||
107 | TypeReference oldRange = range; | ||
108 | range = newRange; | ||
109 | if (eNotificationRequired()) { | ||
110 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.FUNCTION__RANGE, oldRange, newRange); | ||
111 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
112 | } | ||
113 | return msgs; | ||
114 | } | ||
115 | |||
116 | /** | ||
117 | * <!-- begin-user-doc --> | ||
118 | * <!-- end-user-doc --> | ||
119 | * @generated | ||
120 | */ | ||
121 | public void setRange(TypeReference newRange) { | ||
122 | if (newRange != range) { | ||
123 | NotificationChain msgs = null; | ||
124 | if (range != null) | ||
125 | msgs = ((InternalEObject)range).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.FUNCTION__RANGE, null, msgs); | ||
126 | if (newRange != null) | ||
127 | msgs = ((InternalEObject)newRange).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.FUNCTION__RANGE, null, msgs); | ||
128 | msgs = basicSetRange(newRange, msgs); | ||
129 | if (msgs != null) msgs.dispatch(); | ||
130 | } | ||
131 | else if (eNotificationRequired()) | ||
132 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.FUNCTION__RANGE, newRange, newRange)); | ||
133 | } | ||
134 | |||
135 | /** | ||
136 | * <!-- begin-user-doc --> | ||
137 | * <!-- end-user-doc --> | ||
138 | * @generated | ||
139 | */ | ||
140 | public EList<TypeReference> getParameters() { | ||
141 | if (parameters == null) { | ||
142 | parameters = new EObjectContainmentEList<TypeReference>(TypeReference.class, this, LogiclanguagePackage.FUNCTION__PARAMETERS); | ||
143 | } | ||
144 | return parameters; | ||
145 | } | ||
146 | |||
147 | /** | ||
148 | * <!-- begin-user-doc --> | ||
149 | * <!-- end-user-doc --> | ||
150 | * @generated | ||
151 | */ | ||
152 | public EList<FunctionAnnotation> getAnnotations() { | ||
153 | if (annotations == null) { | ||
154 | annotations = new EObjectWithInverseResolvingEList<FunctionAnnotation>(FunctionAnnotation.class, this, LogiclanguagePackage.FUNCTION__ANNOTATIONS, LogicproblemPackage.FUNCTION_ANNOTATION__TARGET); | ||
155 | } | ||
156 | return annotations; | ||
157 | } | ||
158 | |||
159 | /** | ||
160 | * <!-- begin-user-doc --> | ||
161 | * <!-- end-user-doc --> | ||
162 | * @generated | ||
163 | */ | ||
164 | @SuppressWarnings("unchecked") | ||
165 | @Override | ||
166 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
167 | switch (featureID) { | ||
168 | case LogiclanguagePackage.FUNCTION__ANNOTATIONS: | ||
169 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getAnnotations()).basicAdd(otherEnd, msgs); | ||
170 | } | ||
171 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
172 | } | ||
173 | |||
174 | /** | ||
175 | * <!-- begin-user-doc --> | ||
176 | * <!-- end-user-doc --> | ||
177 | * @generated | ||
178 | */ | ||
179 | @Override | ||
180 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
181 | switch (featureID) { | ||
182 | case LogiclanguagePackage.FUNCTION__RANGE: | ||
183 | return basicSetRange(null, msgs); | ||
184 | case LogiclanguagePackage.FUNCTION__PARAMETERS: | ||
185 | return ((InternalEList<?>)getParameters()).basicRemove(otherEnd, msgs); | ||
186 | case LogiclanguagePackage.FUNCTION__ANNOTATIONS: | ||
187 | return ((InternalEList<?>)getAnnotations()).basicRemove(otherEnd, msgs); | ||
188 | } | ||
189 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
190 | } | ||
191 | |||
192 | /** | ||
193 | * <!-- begin-user-doc --> | ||
194 | * <!-- end-user-doc --> | ||
195 | * @generated | ||
196 | */ | ||
197 | @Override | ||
198 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
199 | switch (featureID) { | ||
200 | case LogiclanguagePackage.FUNCTION__RANGE: | ||
201 | return getRange(); | ||
202 | case LogiclanguagePackage.FUNCTION__PARAMETERS: | ||
203 | return getParameters(); | ||
204 | case LogiclanguagePackage.FUNCTION__ANNOTATIONS: | ||
205 | return getAnnotations(); | ||
206 | } | ||
207 | return super.eGet(featureID, resolve, coreType); | ||
208 | } | ||
209 | |||
210 | /** | ||
211 | * <!-- begin-user-doc --> | ||
212 | * <!-- end-user-doc --> | ||
213 | * @generated | ||
214 | */ | ||
215 | @SuppressWarnings("unchecked") | ||
216 | @Override | ||
217 | public void eSet(int featureID, Object newValue) { | ||
218 | switch (featureID) { | ||
219 | case LogiclanguagePackage.FUNCTION__RANGE: | ||
220 | setRange((TypeReference)newValue); | ||
221 | return; | ||
222 | case LogiclanguagePackage.FUNCTION__PARAMETERS: | ||
223 | getParameters().clear(); | ||
224 | getParameters().addAll((Collection<? extends TypeReference>)newValue); | ||
225 | return; | ||
226 | case LogiclanguagePackage.FUNCTION__ANNOTATIONS: | ||
227 | getAnnotations().clear(); | ||
228 | getAnnotations().addAll((Collection<? extends FunctionAnnotation>)newValue); | ||
229 | return; | ||
230 | } | ||
231 | super.eSet(featureID, newValue); | ||
232 | } | ||
233 | |||
234 | /** | ||
235 | * <!-- begin-user-doc --> | ||
236 | * <!-- end-user-doc --> | ||
237 | * @generated | ||
238 | */ | ||
239 | @Override | ||
240 | public void eUnset(int featureID) { | ||
241 | switch (featureID) { | ||
242 | case LogiclanguagePackage.FUNCTION__RANGE: | ||
243 | setRange((TypeReference)null); | ||
244 | return; | ||
245 | case LogiclanguagePackage.FUNCTION__PARAMETERS: | ||
246 | getParameters().clear(); | ||
247 | return; | ||
248 | case LogiclanguagePackage.FUNCTION__ANNOTATIONS: | ||
249 | getAnnotations().clear(); | ||
250 | return; | ||
251 | } | ||
252 | super.eUnset(featureID); | ||
253 | } | ||
254 | |||
255 | /** | ||
256 | * <!-- begin-user-doc --> | ||
257 | * <!-- end-user-doc --> | ||
258 | * @generated | ||
259 | */ | ||
260 | @Override | ||
261 | public boolean eIsSet(int featureID) { | ||
262 | switch (featureID) { | ||
263 | case LogiclanguagePackage.FUNCTION__RANGE: | ||
264 | return range != null; | ||
265 | case LogiclanguagePackage.FUNCTION__PARAMETERS: | ||
266 | return parameters != null && !parameters.isEmpty(); | ||
267 | case LogiclanguagePackage.FUNCTION__ANNOTATIONS: | ||
268 | return annotations != null && !annotations.isEmpty(); | ||
269 | } | ||
270 | return super.eIsSet(featureID); | ||
271 | } | ||
272 | |||
273 | } //FunctionImpl | ||