aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSFieldDeclarationImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSFieldDeclarationImpl.java')
-rw-r--r--Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSFieldDeclarationImpl.java265
1 files changed, 265 insertions, 0 deletions
diff --git a/Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSFieldDeclarationImpl.java b/Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSFieldDeclarationImpl.java
new file mode 100644
index 00000000..0bc3aa1c
--- /dev/null
+++ b/Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSFieldDeclarationImpl.java
@@ -0,0 +1,265 @@
1/**
2 */
3package hu.bme.mit.inf.dslreasoner.alloyLanguage.impl;
4
5import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSFieldDeclaration;
6import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSMultiplicity;
7import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSTerm;
8import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguagePackage;
9
10import org.eclipse.emf.common.notify.Notification;
11import org.eclipse.emf.common.notify.NotificationChain;
12
13import org.eclipse.emf.ecore.EClass;
14import org.eclipse.emf.ecore.InternalEObject;
15
16import org.eclipse.emf.ecore.impl.ENotificationImpl;
17
18/**
19 * <!-- begin-user-doc -->
20 * An implementation of the model object '<em><b>ALS Field Declaration</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.alloyLanguage.impl.ALSFieldDeclarationImpl#getMultiplicity <em>Multiplicity</em>}</li>
27 * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSFieldDeclarationImpl#getType <em>Type</em>}</li>
28 * </ul>
29 *
30 * @generated
31 */
32public class ALSFieldDeclarationImpl extends ALSRelationDeclarationImpl implements ALSFieldDeclaration
33{
34 /**
35 * The default value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute.
36 * <!-- begin-user-doc -->
37 * <!-- end-user-doc -->
38 * @see #getMultiplicity()
39 * @generated
40 * @ordered
41 */
42 protected static final ALSMultiplicity MULTIPLICITY_EDEFAULT = ALSMultiplicity.ALL;
43
44 /**
45 * The cached value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute.
46 * <!-- begin-user-doc -->
47 * <!-- end-user-doc -->
48 * @see #getMultiplicity()
49 * @generated
50 * @ordered
51 */
52 protected ALSMultiplicity multiplicity = MULTIPLICITY_EDEFAULT;
53
54 /**
55 * The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
56 * <!-- begin-user-doc -->
57 * <!-- end-user-doc -->
58 * @see #getType()
59 * @generated
60 * @ordered
61 */
62 protected ALSTerm type;
63
64 /**
65 * <!-- begin-user-doc -->
66 * <!-- end-user-doc -->
67 * @generated
68 */
69 protected ALSFieldDeclarationImpl()
70 {
71 super();
72 }
73
74 /**
75 * <!-- begin-user-doc -->
76 * <!-- end-user-doc -->
77 * @generated
78 */
79 @Override
80 protected EClass eStaticClass()
81 {
82 return AlloyLanguagePackage.Literals.ALS_FIELD_DECLARATION;
83 }
84
85 /**
86 * <!-- begin-user-doc -->
87 * <!-- end-user-doc -->
88 * @generated
89 */
90 public ALSMultiplicity getMultiplicity()
91 {
92 return multiplicity;
93 }
94
95 /**
96 * <!-- begin-user-doc -->
97 * <!-- end-user-doc -->
98 * @generated
99 */
100 public void setMultiplicity(ALSMultiplicity newMultiplicity)
101 {
102 ALSMultiplicity oldMultiplicity = multiplicity;
103 multiplicity = newMultiplicity == null ? MULTIPLICITY_EDEFAULT : newMultiplicity;
104 if (eNotificationRequired())
105 eNotify(new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_FIELD_DECLARATION__MULTIPLICITY, oldMultiplicity, multiplicity));
106 }
107
108 /**
109 * <!-- begin-user-doc -->
110 * <!-- end-user-doc -->
111 * @generated
112 */
113 public ALSTerm getType()
114 {
115 return type;
116 }
117
118 /**
119 * <!-- begin-user-doc -->
120 * <!-- end-user-doc -->
121 * @generated
122 */
123 public NotificationChain basicSetType(ALSTerm newType, NotificationChain msgs)
124 {
125 ALSTerm oldType = type;
126 type = newType;
127 if (eNotificationRequired())
128 {
129 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_FIELD_DECLARATION__TYPE, oldType, newType);
130 if (msgs == null) msgs = notification; else msgs.add(notification);
131 }
132 return msgs;
133 }
134
135 /**
136 * <!-- begin-user-doc -->
137 * <!-- end-user-doc -->
138 * @generated
139 */
140 public void setType(ALSTerm newType)
141 {
142 if (newType != type)
143 {
144 NotificationChain msgs = null;
145 if (type != null)
146 msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AlloyLanguagePackage.ALS_FIELD_DECLARATION__TYPE, null, msgs);
147 if (newType != null)
148 msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - AlloyLanguagePackage.ALS_FIELD_DECLARATION__TYPE, null, msgs);
149 msgs = basicSetType(newType, msgs);
150 if (msgs != null) msgs.dispatch();
151 }
152 else if (eNotificationRequired())
153 eNotify(new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_FIELD_DECLARATION__TYPE, newType, newType));
154 }
155
156 /**
157 * <!-- begin-user-doc -->
158 * <!-- end-user-doc -->
159 * @generated
160 */
161 @Override
162 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
163 {
164 switch (featureID)
165 {
166 case AlloyLanguagePackage.ALS_FIELD_DECLARATION__TYPE:
167 return basicSetType(null, msgs);
168 }
169 return super.eInverseRemove(otherEnd, featureID, msgs);
170 }
171
172 /**
173 * <!-- begin-user-doc -->
174 * <!-- end-user-doc -->
175 * @generated
176 */
177 @Override
178 public Object eGet(int featureID, boolean resolve, boolean coreType)
179 {
180 switch (featureID)
181 {
182 case AlloyLanguagePackage.ALS_FIELD_DECLARATION__MULTIPLICITY:
183 return getMultiplicity();
184 case AlloyLanguagePackage.ALS_FIELD_DECLARATION__TYPE:
185 return getType();
186 }
187 return super.eGet(featureID, resolve, coreType);
188 }
189
190 /**
191 * <!-- begin-user-doc -->
192 * <!-- end-user-doc -->
193 * @generated
194 */
195 @Override
196 public void eSet(int featureID, Object newValue)
197 {
198 switch (featureID)
199 {
200 case AlloyLanguagePackage.ALS_FIELD_DECLARATION__MULTIPLICITY:
201 setMultiplicity((ALSMultiplicity)newValue);
202 return;
203 case AlloyLanguagePackage.ALS_FIELD_DECLARATION__TYPE:
204 setType((ALSTerm)newValue);
205 return;
206 }
207 super.eSet(featureID, newValue);
208 }
209
210 /**
211 * <!-- begin-user-doc -->
212 * <!-- end-user-doc -->
213 * @generated
214 */
215 @Override
216 public void eUnset(int featureID)
217 {
218 switch (featureID)
219 {
220 case AlloyLanguagePackage.ALS_FIELD_DECLARATION__MULTIPLICITY:
221 setMultiplicity(MULTIPLICITY_EDEFAULT);
222 return;
223 case AlloyLanguagePackage.ALS_FIELD_DECLARATION__TYPE:
224 setType((ALSTerm)null);
225 return;
226 }
227 super.eUnset(featureID);
228 }
229
230 /**
231 * <!-- begin-user-doc -->
232 * <!-- end-user-doc -->
233 * @generated
234 */
235 @Override
236 public boolean eIsSet(int featureID)
237 {
238 switch (featureID)
239 {
240 case AlloyLanguagePackage.ALS_FIELD_DECLARATION__MULTIPLICITY:
241 return multiplicity != MULTIPLICITY_EDEFAULT;
242 case AlloyLanguagePackage.ALS_FIELD_DECLARATION__TYPE:
243 return type != null;
244 }
245 return super.eIsSet(featureID);
246 }
247
248 /**
249 * <!-- begin-user-doc -->
250 * <!-- end-user-doc -->
251 * @generated
252 */
253 @Override
254 public String toString()
255 {
256 if (eIsProxy()) return super.toString();
257
258 StringBuffer result = new StringBuffer(super.toString());
259 result.append(" (multiplicity: ");
260 result.append(multiplicity);
261 result.append(')');
262 return result.toString();
263 }
264
265} //ALSFieldDeclarationImpl