diff options
author | 2020-06-23 15:17:00 +0200 | |
---|---|---|
committer | 2020-06-23 15:17:00 +0200 | |
commit | 42c58bbeead1dae09c51f47abc8e10dfbb9c3f9f (patch) | |
tree | 21d49c3a1dadc54dda399a4b8cfe8dc028563f51 /Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/EnumDeclarationImpl.java | |
parent | Measurements framework fixes (diff) | |
download | VIATRA-Generator-42c58bbeead1dae09c51f47abc8e10dfbb9c3f9f.tar.gz VIATRA-Generator-42c58bbeead1dae09c51f47abc8e10dfbb9c3f9f.tar.zst VIATRA-Generator-42c58bbeead1dae09c51f47abc8e10dfbb9c3f9f.zip |
New configuration language parser WIP
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/EnumDeclarationImpl.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/EnumDeclarationImpl.java | 224 |
1 files changed, 224 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/EnumDeclarationImpl.java b/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/EnumDeclarationImpl.java new file mode 100644 index 00000000..1ddcc2f1 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/EnumDeclarationImpl.java | |||
@@ -0,0 +1,224 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.solverLanguage.impl; | ||
4 | |||
5 | import java.util.Collection; | ||
6 | |||
7 | import org.eclipse.emf.common.notify.Notification; | ||
8 | import org.eclipse.emf.common.notify.NotificationChain; | ||
9 | |||
10 | import org.eclipse.emf.common.util.EList; | ||
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 | |||
17 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
18 | import org.eclipse.emf.ecore.util.InternalEList; | ||
19 | |||
20 | import org.eclipse.viatra.solver.language.solverLanguage.EnumDeclaration; | ||
21 | import org.eclipse.viatra.solver.language.solverLanguage.EnumLiteral; | ||
22 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | ||
23 | |||
24 | /** | ||
25 | * <!-- begin-user-doc --> | ||
26 | * An implementation of the model object '<em><b>Enum Declaration</b></em>'. | ||
27 | * <!-- end-user-doc --> | ||
28 | * <p> | ||
29 | * The following features are implemented: | ||
30 | * </p> | ||
31 | * <ul> | ||
32 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.EnumDeclarationImpl#getLiterals <em>Literals</em>}</li> | ||
33 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.EnumDeclarationImpl#getName <em>Name</em>}</li> | ||
34 | * </ul> | ||
35 | * | ||
36 | * @generated | ||
37 | */ | ||
38 | public class EnumDeclarationImpl extends StatementImpl implements EnumDeclaration { | ||
39 | /** | ||
40 | * The cached value of the '{@link #getLiterals() <em>Literals</em>}' containment reference list. | ||
41 | * <!-- begin-user-doc --> | ||
42 | * <!-- end-user-doc --> | ||
43 | * @see #getLiterals() | ||
44 | * @generated | ||
45 | * @ordered | ||
46 | */ | ||
47 | protected EList<EnumLiteral> literals; | ||
48 | |||
49 | /** | ||
50 | * The default value of the '{@link #getName() <em>Name</em>}' attribute. | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @see #getName() | ||
54 | * @generated | ||
55 | * @ordered | ||
56 | */ | ||
57 | protected static final String NAME_EDEFAULT = null; | ||
58 | |||
59 | /** | ||
60 | * The cached value of the '{@link #getName() <em>Name</em>}' attribute. | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @see #getName() | ||
64 | * @generated | ||
65 | * @ordered | ||
66 | */ | ||
67 | protected String name = NAME_EDEFAULT; | ||
68 | |||
69 | /** | ||
70 | * <!-- begin-user-doc --> | ||
71 | * <!-- end-user-doc --> | ||
72 | * @generated | ||
73 | */ | ||
74 | protected EnumDeclarationImpl() { | ||
75 | super(); | ||
76 | } | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | @Override | ||
84 | protected EClass eStaticClass() { | ||
85 | return SolverLanguagePackage.Literals.ENUM_DECLARATION; | ||
86 | } | ||
87 | |||
88 | /** | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @generated | ||
92 | */ | ||
93 | public EList<EnumLiteral> getLiterals() { | ||
94 | if (literals == null) { | ||
95 | literals = new EObjectContainmentEList<EnumLiteral>(EnumLiteral.class, this, | ||
96 | SolverLanguagePackage.ENUM_DECLARATION__LITERALS); | ||
97 | } | ||
98 | return literals; | ||
99 | } | ||
100 | |||
101 | /** | ||
102 | * <!-- begin-user-doc --> | ||
103 | * <!-- end-user-doc --> | ||
104 | * @generated | ||
105 | */ | ||
106 | public String getName() { | ||
107 | return name; | ||
108 | } | ||
109 | |||
110 | /** | ||
111 | * <!-- begin-user-doc --> | ||
112 | * <!-- end-user-doc --> | ||
113 | * @generated | ||
114 | */ | ||
115 | public void setName(String newName) { | ||
116 | String oldName = name; | ||
117 | name = newName; | ||
118 | if (eNotificationRequired()) | ||
119 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.ENUM_DECLARATION__NAME, oldName, | ||
120 | name)); | ||
121 | } | ||
122 | |||
123 | /** | ||
124 | * <!-- begin-user-doc --> | ||
125 | * <!-- end-user-doc --> | ||
126 | * @generated | ||
127 | */ | ||
128 | @Override | ||
129 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
130 | switch (featureID) { | ||
131 | case SolverLanguagePackage.ENUM_DECLARATION__LITERALS: | ||
132 | return ((InternalEList<?>) getLiterals()).basicRemove(otherEnd, msgs); | ||
133 | } | ||
134 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
135 | } | ||
136 | |||
137 | /** | ||
138 | * <!-- begin-user-doc --> | ||
139 | * <!-- end-user-doc --> | ||
140 | * @generated | ||
141 | */ | ||
142 | @Override | ||
143 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
144 | switch (featureID) { | ||
145 | case SolverLanguagePackage.ENUM_DECLARATION__LITERALS: | ||
146 | return getLiterals(); | ||
147 | case SolverLanguagePackage.ENUM_DECLARATION__NAME: | ||
148 | return getName(); | ||
149 | } | ||
150 | return super.eGet(featureID, resolve, coreType); | ||
151 | } | ||
152 | |||
153 | /** | ||
154 | * <!-- begin-user-doc --> | ||
155 | * <!-- end-user-doc --> | ||
156 | * @generated | ||
157 | */ | ||
158 | @SuppressWarnings("unchecked") | ||
159 | @Override | ||
160 | public void eSet(int featureID, Object newValue) { | ||
161 | switch (featureID) { | ||
162 | case SolverLanguagePackage.ENUM_DECLARATION__LITERALS: | ||
163 | getLiterals().clear(); | ||
164 | getLiterals().addAll((Collection<? extends EnumLiteral>) newValue); | ||
165 | return; | ||
166 | case SolverLanguagePackage.ENUM_DECLARATION__NAME: | ||
167 | setName((String) newValue); | ||
168 | return; | ||
169 | } | ||
170 | super.eSet(featureID, newValue); | ||
171 | } | ||
172 | |||
173 | /** | ||
174 | * <!-- begin-user-doc --> | ||
175 | * <!-- end-user-doc --> | ||
176 | * @generated | ||
177 | */ | ||
178 | @Override | ||
179 | public void eUnset(int featureID) { | ||
180 | switch (featureID) { | ||
181 | case SolverLanguagePackage.ENUM_DECLARATION__LITERALS: | ||
182 | getLiterals().clear(); | ||
183 | return; | ||
184 | case SolverLanguagePackage.ENUM_DECLARATION__NAME: | ||
185 | setName(NAME_EDEFAULT); | ||
186 | return; | ||
187 | } | ||
188 | super.eUnset(featureID); | ||
189 | } | ||
190 | |||
191 | /** | ||
192 | * <!-- begin-user-doc --> | ||
193 | * <!-- end-user-doc --> | ||
194 | * @generated | ||
195 | */ | ||
196 | @Override | ||
197 | public boolean eIsSet(int featureID) { | ||
198 | switch (featureID) { | ||
199 | case SolverLanguagePackage.ENUM_DECLARATION__LITERALS: | ||
200 | return literals != null && !literals.isEmpty(); | ||
201 | case SolverLanguagePackage.ENUM_DECLARATION__NAME: | ||
202 | return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); | ||
203 | } | ||
204 | return super.eIsSet(featureID); | ||
205 | } | ||
206 | |||
207 | /** | ||
208 | * <!-- begin-user-doc --> | ||
209 | * <!-- end-user-doc --> | ||
210 | * @generated | ||
211 | */ | ||
212 | @Override | ||
213 | public String toString() { | ||
214 | if (eIsProxy()) | ||
215 | return super.toString(); | ||
216 | |||
217 | StringBuilder result = new StringBuilder(super.toString()); | ||
218 | result.append(" (name: "); | ||
219 | result.append(name); | ||
220 | result.append(')'); | ||
221 | return result.toString(); | ||
222 | } | ||
223 | |||
224 | } //EnumDeclarationImpl | ||