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