diff options
author | OszkarSemerath <oszka@152.66.252.189> | 2017-06-10 19:05:05 +0200 |
---|---|---|
committer | OszkarSemerath <oszka@152.66.252.189> | 2017-06-10 19:05:05 +0200 |
commit | 60f01f46ba232ed6416054f0a6115cb2a9b70b4e (patch) | |
tree | 5edf8aeb07abc51f3fec63bbd15c926e1de09552 /Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/ConstantImpl.java | |
parent | Initial commit, migrating from SVN (diff) | |
download | VIATRA-Generator-60f01f46ba232ed6416054f0a6115cb2a9b70b4e.tar.gz VIATRA-Generator-60f01f46ba232ed6416054f0a6115cb2a9b70b4e.tar.zst VIATRA-Generator-60f01f46ba232ed6416054f0a6115cb2a9b70b4e.zip |
Migrating Additional projects
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/ConstantImpl.java')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/ConstantImpl.java | 233 |
1 files changed, 233 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/ConstantImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/ConstantImpl.java new file mode 100644 index 00000000..7c34f669 --- /dev/null +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/ConstantImpl.java | |||
@@ -0,0 +1,233 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Constant; | ||
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.ConstantAnnotation; | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage; | ||
11 | import java.util.Collection; | ||
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 | import org.eclipse.emf.ecore.EClass; | ||
17 | import org.eclipse.emf.ecore.InternalEObject; | ||
18 | |||
19 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
20 | import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; | ||
21 | import org.eclipse.emf.ecore.util.InternalEList; | ||
22 | |||
23 | /** | ||
24 | * <!-- begin-user-doc --> | ||
25 | * An implementation of the model object '<em><b>Constant</b></em>'. | ||
26 | * <!-- end-user-doc --> | ||
27 | * <p> | ||
28 | * The following features are implemented: | ||
29 | * </p> | ||
30 | * <ul> | ||
31 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.ConstantImpl#getType <em>Type</em>}</li> | ||
32 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.ConstantImpl#getAnnotations <em>Annotations</em>}</li> | ||
33 | * </ul> | ||
34 | * | ||
35 | * @generated | ||
36 | */ | ||
37 | public abstract class ConstantImpl extends SymbolicDeclarationImpl implements Constant { | ||
38 | /** | ||
39 | * The cached value of the '{@link #getType() <em>Type</em>}' containment reference. | ||
40 | * <!-- begin-user-doc --> | ||
41 | * <!-- end-user-doc --> | ||
42 | * @see #getType() | ||
43 | * @generated | ||
44 | * @ordered | ||
45 | */ | ||
46 | protected TypeReference type; | ||
47 | |||
48 | /** | ||
49 | * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' reference list. | ||
50 | * <!-- begin-user-doc --> | ||
51 | * <!-- end-user-doc --> | ||
52 | * @see #getAnnotations() | ||
53 | * @generated | ||
54 | * @ordered | ||
55 | */ | ||
56 | protected EList<ConstantAnnotation> annotations; | ||
57 | |||
58 | /** | ||
59 | * <!-- begin-user-doc --> | ||
60 | * <!-- end-user-doc --> | ||
61 | * @generated | ||
62 | */ | ||
63 | protected ConstantImpl() { | ||
64 | super(); | ||
65 | } | ||
66 | |||
67 | /** | ||
68 | * <!-- begin-user-doc --> | ||
69 | * <!-- end-user-doc --> | ||
70 | * @generated | ||
71 | */ | ||
72 | @Override | ||
73 | protected EClass eStaticClass() { | ||
74 | return LogiclanguagePackage.Literals.CONSTANT; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @generated | ||
81 | */ | ||
82 | public TypeReference getType() { | ||
83 | return type; | ||
84 | } | ||
85 | |||
86 | /** | ||
87 | * <!-- begin-user-doc --> | ||
88 | * <!-- end-user-doc --> | ||
89 | * @generated | ||
90 | */ | ||
91 | public NotificationChain basicSetType(TypeReference newType, NotificationChain msgs) { | ||
92 | TypeReference oldType = type; | ||
93 | type = newType; | ||
94 | if (eNotificationRequired()) { | ||
95 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.CONSTANT__TYPE, oldType, newType); | ||
96 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
97 | } | ||
98 | return msgs; | ||
99 | } | ||
100 | |||
101 | /** | ||
102 | * <!-- begin-user-doc --> | ||
103 | * <!-- end-user-doc --> | ||
104 | * @generated | ||
105 | */ | ||
106 | public void setType(TypeReference newType) { | ||
107 | if (newType != type) { | ||
108 | NotificationChain msgs = null; | ||
109 | if (type != null) | ||
110 | msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.CONSTANT__TYPE, null, msgs); | ||
111 | if (newType != null) | ||
112 | msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.CONSTANT__TYPE, null, msgs); | ||
113 | msgs = basicSetType(newType, msgs); | ||
114 | if (msgs != null) msgs.dispatch(); | ||
115 | } | ||
116 | else if (eNotificationRequired()) | ||
117 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.CONSTANT__TYPE, newType, newType)); | ||
118 | } | ||
119 | |||
120 | /** | ||
121 | * <!-- begin-user-doc --> | ||
122 | * <!-- end-user-doc --> | ||
123 | * @generated | ||
124 | */ | ||
125 | public EList<ConstantAnnotation> getAnnotations() { | ||
126 | if (annotations == null) { | ||
127 | annotations = new EObjectWithInverseResolvingEList<ConstantAnnotation>(ConstantAnnotation.class, this, LogiclanguagePackage.CONSTANT__ANNOTATIONS, LogicproblemPackage.CONSTANT_ANNOTATION__TARGET); | ||
128 | } | ||
129 | return annotations; | ||
130 | } | ||
131 | |||
132 | /** | ||
133 | * <!-- begin-user-doc --> | ||
134 | * <!-- end-user-doc --> | ||
135 | * @generated | ||
136 | */ | ||
137 | @SuppressWarnings("unchecked") | ||
138 | @Override | ||
139 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
140 | switch (featureID) { | ||
141 | case LogiclanguagePackage.CONSTANT__ANNOTATIONS: | ||
142 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getAnnotations()).basicAdd(otherEnd, msgs); | ||
143 | } | ||
144 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
145 | } | ||
146 | |||
147 | /** | ||
148 | * <!-- begin-user-doc --> | ||
149 | * <!-- end-user-doc --> | ||
150 | * @generated | ||
151 | */ | ||
152 | @Override | ||
153 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
154 | switch (featureID) { | ||
155 | case LogiclanguagePackage.CONSTANT__TYPE: | ||
156 | return basicSetType(null, msgs); | ||
157 | case LogiclanguagePackage.CONSTANT__ANNOTATIONS: | ||
158 | return ((InternalEList<?>)getAnnotations()).basicRemove(otherEnd, msgs); | ||
159 | } | ||
160 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * <!-- begin-user-doc --> | ||
165 | * <!-- end-user-doc --> | ||
166 | * @generated | ||
167 | */ | ||
168 | @Override | ||
169 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
170 | switch (featureID) { | ||
171 | case LogiclanguagePackage.CONSTANT__TYPE: | ||
172 | return getType(); | ||
173 | case LogiclanguagePackage.CONSTANT__ANNOTATIONS: | ||
174 | return getAnnotations(); | ||
175 | } | ||
176 | return super.eGet(featureID, resolve, coreType); | ||
177 | } | ||
178 | |||
179 | /** | ||
180 | * <!-- begin-user-doc --> | ||
181 | * <!-- end-user-doc --> | ||
182 | * @generated | ||
183 | */ | ||
184 | @SuppressWarnings("unchecked") | ||
185 | @Override | ||
186 | public void eSet(int featureID, Object newValue) { | ||
187 | switch (featureID) { | ||
188 | case LogiclanguagePackage.CONSTANT__TYPE: | ||
189 | setType((TypeReference)newValue); | ||
190 | return; | ||
191 | case LogiclanguagePackage.CONSTANT__ANNOTATIONS: | ||
192 | getAnnotations().clear(); | ||
193 | getAnnotations().addAll((Collection<? extends ConstantAnnotation>)newValue); | ||
194 | return; | ||
195 | } | ||
196 | super.eSet(featureID, newValue); | ||
197 | } | ||
198 | |||
199 | /** | ||
200 | * <!-- begin-user-doc --> | ||
201 | * <!-- end-user-doc --> | ||
202 | * @generated | ||
203 | */ | ||
204 | @Override | ||
205 | public void eUnset(int featureID) { | ||
206 | switch (featureID) { | ||
207 | case LogiclanguagePackage.CONSTANT__TYPE: | ||
208 | setType((TypeReference)null); | ||
209 | return; | ||
210 | case LogiclanguagePackage.CONSTANT__ANNOTATIONS: | ||
211 | getAnnotations().clear(); | ||
212 | return; | ||
213 | } | ||
214 | super.eUnset(featureID); | ||
215 | } | ||
216 | |||
217 | /** | ||
218 | * <!-- begin-user-doc --> | ||
219 | * <!-- end-user-doc --> | ||
220 | * @generated | ||
221 | */ | ||
222 | @Override | ||
223 | public boolean eIsSet(int featureID) { | ||
224 | switch (featureID) { | ||
225 | case LogiclanguagePackage.CONSTANT__TYPE: | ||
226 | return type != null; | ||
227 | case LogiclanguagePackage.CONSTANT__ANNOTATIONS: | ||
228 | return annotations != null && !annotations.isEmpty(); | ||
229 | } | ||
230 | return super.eIsSet(featureID); | ||
231 | } | ||
232 | |||
233 | } //ConstantImpl | ||