diff options
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/ConstantDefinitionImpl.java')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/ConstantDefinitionImpl.java | 236 |
1 files changed, 236 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/ConstantDefinitionImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/ConstantDefinitionImpl.java new file mode 100644 index 00000000..1114508e --- /dev/null +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/ConstantDefinitionImpl.java | |||
@@ -0,0 +1,236 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDeclaration; | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDefinition; | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage; | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Term; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.Notification; | ||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.ecore.EClass; | ||
14 | import org.eclipse.emf.ecore.InternalEObject; | ||
15 | |||
16 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
17 | |||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * An implementation of the model object '<em><b>Constant Definition</b></em>'. | ||
21 | * <!-- end-user-doc --> | ||
22 | * <p> | ||
23 | * The following features are implemented: | ||
24 | * </p> | ||
25 | * <ul> | ||
26 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.ConstantDefinitionImpl#getValue <em>Value</em>}</li> | ||
27 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.ConstantDefinitionImpl#getDefines <em>Defines</em>}</li> | ||
28 | * </ul> | ||
29 | * | ||
30 | * @generated | ||
31 | */ | ||
32 | public class ConstantDefinitionImpl extends ConstantImpl implements ConstantDefinition { | ||
33 | /** | ||
34 | * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference. | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @see #getValue() | ||
38 | * @generated | ||
39 | * @ordered | ||
40 | */ | ||
41 | protected Term value; | ||
42 | |||
43 | /** | ||
44 | * The cached value of the '{@link #getDefines() <em>Defines</em>}' reference. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @see #getDefines() | ||
48 | * @generated | ||
49 | * @ordered | ||
50 | */ | ||
51 | protected ConstantDeclaration defines; | ||
52 | |||
53 | /** | ||
54 | * <!-- begin-user-doc --> | ||
55 | * <!-- end-user-doc --> | ||
56 | * @generated | ||
57 | */ | ||
58 | protected ConstantDefinitionImpl() { | ||
59 | super(); | ||
60 | } | ||
61 | |||
62 | /** | ||
63 | * <!-- begin-user-doc --> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @generated | ||
66 | */ | ||
67 | @Override | ||
68 | protected EClass eStaticClass() { | ||
69 | return LogiclanguagePackage.Literals.CONSTANT_DEFINITION; | ||
70 | } | ||
71 | |||
72 | /** | ||
73 | * <!-- begin-user-doc --> | ||
74 | * <!-- end-user-doc --> | ||
75 | * @generated | ||
76 | */ | ||
77 | public Term getValue() { | ||
78 | return value; | ||
79 | } | ||
80 | |||
81 | /** | ||
82 | * <!-- begin-user-doc --> | ||
83 | * <!-- end-user-doc --> | ||
84 | * @generated | ||
85 | */ | ||
86 | public NotificationChain basicSetValue(Term newValue, NotificationChain msgs) { | ||
87 | Term oldValue = value; | ||
88 | value = newValue; | ||
89 | if (eNotificationRequired()) { | ||
90 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.CONSTANT_DEFINITION__VALUE, oldValue, newValue); | ||
91 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
92 | } | ||
93 | return msgs; | ||
94 | } | ||
95 | |||
96 | /** | ||
97 | * <!-- begin-user-doc --> | ||
98 | * <!-- end-user-doc --> | ||
99 | * @generated | ||
100 | */ | ||
101 | public void setValue(Term newValue) { | ||
102 | if (newValue != value) { | ||
103 | NotificationChain msgs = null; | ||
104 | if (value != null) | ||
105 | msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.CONSTANT_DEFINITION__VALUE, null, msgs); | ||
106 | if (newValue != null) | ||
107 | msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.CONSTANT_DEFINITION__VALUE, null, msgs); | ||
108 | msgs = basicSetValue(newValue, msgs); | ||
109 | if (msgs != null) msgs.dispatch(); | ||
110 | } | ||
111 | else if (eNotificationRequired()) | ||
112 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.CONSTANT_DEFINITION__VALUE, newValue, newValue)); | ||
113 | } | ||
114 | |||
115 | /** | ||
116 | * <!-- begin-user-doc --> | ||
117 | * <!-- end-user-doc --> | ||
118 | * @generated | ||
119 | */ | ||
120 | public ConstantDeclaration getDefines() { | ||
121 | if (defines != null && defines.eIsProxy()) { | ||
122 | InternalEObject oldDefines = (InternalEObject)defines; | ||
123 | defines = (ConstantDeclaration)eResolveProxy(oldDefines); | ||
124 | if (defines != oldDefines) { | ||
125 | if (eNotificationRequired()) | ||
126 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, LogiclanguagePackage.CONSTANT_DEFINITION__DEFINES, oldDefines, defines)); | ||
127 | } | ||
128 | } | ||
129 | return defines; | ||
130 | } | ||
131 | |||
132 | /** | ||
133 | * <!-- begin-user-doc --> | ||
134 | * <!-- end-user-doc --> | ||
135 | * @generated | ||
136 | */ | ||
137 | public ConstantDeclaration basicGetDefines() { | ||
138 | return defines; | ||
139 | } | ||
140 | |||
141 | /** | ||
142 | * <!-- begin-user-doc --> | ||
143 | * <!-- end-user-doc --> | ||
144 | * @generated | ||
145 | */ | ||
146 | public void setDefines(ConstantDeclaration newDefines) { | ||
147 | ConstantDeclaration oldDefines = defines; | ||
148 | defines = newDefines; | ||
149 | if (eNotificationRequired()) | ||
150 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.CONSTANT_DEFINITION__DEFINES, oldDefines, defines)); | ||
151 | } | ||
152 | |||
153 | /** | ||
154 | * <!-- begin-user-doc --> | ||
155 | * <!-- end-user-doc --> | ||
156 | * @generated | ||
157 | */ | ||
158 | @Override | ||
159 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
160 | switch (featureID) { | ||
161 | case LogiclanguagePackage.CONSTANT_DEFINITION__VALUE: | ||
162 | return basicSetValue(null, msgs); | ||
163 | } | ||
164 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
165 | } | ||
166 | |||
167 | /** | ||
168 | * <!-- begin-user-doc --> | ||
169 | * <!-- end-user-doc --> | ||
170 | * @generated | ||
171 | */ | ||
172 | @Override | ||
173 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
174 | switch (featureID) { | ||
175 | case LogiclanguagePackage.CONSTANT_DEFINITION__VALUE: | ||
176 | return getValue(); | ||
177 | case LogiclanguagePackage.CONSTANT_DEFINITION__DEFINES: | ||
178 | if (resolve) return getDefines(); | ||
179 | return basicGetDefines(); | ||
180 | } | ||
181 | return super.eGet(featureID, resolve, coreType); | ||
182 | } | ||
183 | |||
184 | /** | ||
185 | * <!-- begin-user-doc --> | ||
186 | * <!-- end-user-doc --> | ||
187 | * @generated | ||
188 | */ | ||
189 | @Override | ||
190 | public void eSet(int featureID, Object newValue) { | ||
191 | switch (featureID) { | ||
192 | case LogiclanguagePackage.CONSTANT_DEFINITION__VALUE: | ||
193 | setValue((Term)newValue); | ||
194 | return; | ||
195 | case LogiclanguagePackage.CONSTANT_DEFINITION__DEFINES: | ||
196 | setDefines((ConstantDeclaration)newValue); | ||
197 | return; | ||
198 | } | ||
199 | super.eSet(featureID, newValue); | ||
200 | } | ||
201 | |||
202 | /** | ||
203 | * <!-- begin-user-doc --> | ||
204 | * <!-- end-user-doc --> | ||
205 | * @generated | ||
206 | */ | ||
207 | @Override | ||
208 | public void eUnset(int featureID) { | ||
209 | switch (featureID) { | ||
210 | case LogiclanguagePackage.CONSTANT_DEFINITION__VALUE: | ||
211 | setValue((Term)null); | ||
212 | return; | ||
213 | case LogiclanguagePackage.CONSTANT_DEFINITION__DEFINES: | ||
214 | setDefines((ConstantDeclaration)null); | ||
215 | return; | ||
216 | } | ||
217 | super.eUnset(featureID); | ||
218 | } | ||
219 | |||
220 | /** | ||
221 | * <!-- begin-user-doc --> | ||
222 | * <!-- end-user-doc --> | ||
223 | * @generated | ||
224 | */ | ||
225 | @Override | ||
226 | public boolean eIsSet(int featureID) { | ||
227 | switch (featureID) { | ||
228 | case LogiclanguagePackage.CONSTANT_DEFINITION__VALUE: | ||
229 | return value != null; | ||
230 | case LogiclanguagePackage.CONSTANT_DEFINITION__DEFINES: | ||
231 | return defines != null; | ||
232 | } | ||
233 | return super.eIsSet(featureID); | ||
234 | } | ||
235 | |||
236 | } //ConstantDefinitionImpl | ||