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/TypeReferenceImpl.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/TypeReferenceImpl.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/TypeReferenceImpl.java | 230 |
1 files changed, 230 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/TypeReferenceImpl.java b/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/TypeReferenceImpl.java new file mode 100644 index 00000000..a3c76e63 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/TypeReferenceImpl.java | |||
@@ -0,0 +1,230 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.solverLanguage.impl; | ||
4 | |||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | import org.eclipse.emf.ecore.InternalEObject; | ||
9 | |||
10 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
11 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
12 | |||
13 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | ||
14 | import org.eclipse.viatra.solver.language.solverLanguage.Symbol; | ||
15 | import org.eclipse.viatra.solver.language.solverLanguage.TypeReference; | ||
16 | |||
17 | /** | ||
18 | * <!-- begin-user-doc --> | ||
19 | * An implementation of the model object '<em><b>Type Reference</b></em>'. | ||
20 | * <!-- end-user-doc --> | ||
21 | * <p> | ||
22 | * The following features are implemented: | ||
23 | * </p> | ||
24 | * <ul> | ||
25 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.TypeReferenceImpl#isForceObjectType <em>Force Object Type</em>}</li> | ||
26 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.TypeReferenceImpl#getType <em>Type</em>}</li> | ||
27 | * </ul> | ||
28 | * | ||
29 | * @generated | ||
30 | */ | ||
31 | public class TypeReferenceImpl extends MinimalEObjectImpl.Container implements TypeReference { | ||
32 | /** | ||
33 | * The default value of the '{@link #isForceObjectType() <em>Force Object Type</em>}' attribute. | ||
34 | * <!-- begin-user-doc --> | ||
35 | * <!-- end-user-doc --> | ||
36 | * @see #isForceObjectType() | ||
37 | * @generated | ||
38 | * @ordered | ||
39 | */ | ||
40 | protected static final boolean FORCE_OBJECT_TYPE_EDEFAULT = false; | ||
41 | |||
42 | /** | ||
43 | * The cached value of the '{@link #isForceObjectType() <em>Force Object Type</em>}' attribute. | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @see #isForceObjectType() | ||
47 | * @generated | ||
48 | * @ordered | ||
49 | */ | ||
50 | protected boolean forceObjectType = FORCE_OBJECT_TYPE_EDEFAULT; | ||
51 | |||
52 | /** | ||
53 | * The cached value of the '{@link #getType() <em>Type</em>}' reference. | ||
54 | * <!-- begin-user-doc --> | ||
55 | * <!-- end-user-doc --> | ||
56 | * @see #getType() | ||
57 | * @generated | ||
58 | * @ordered | ||
59 | */ | ||
60 | protected Symbol type; | ||
61 | |||
62 | /** | ||
63 | * <!-- begin-user-doc --> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @generated | ||
66 | */ | ||
67 | protected TypeReferenceImpl() { | ||
68 | super(); | ||
69 | } | ||
70 | |||
71 | /** | ||
72 | * <!-- begin-user-doc --> | ||
73 | * <!-- end-user-doc --> | ||
74 | * @generated | ||
75 | */ | ||
76 | @Override | ||
77 | protected EClass eStaticClass() { | ||
78 | return SolverLanguagePackage.Literals.TYPE_REFERENCE; | ||
79 | } | ||
80 | |||
81 | /** | ||
82 | * <!-- begin-user-doc --> | ||
83 | * <!-- end-user-doc --> | ||
84 | * @generated | ||
85 | */ | ||
86 | public boolean isForceObjectType() { | ||
87 | return forceObjectType; | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * <!-- begin-user-doc --> | ||
92 | * <!-- end-user-doc --> | ||
93 | * @generated | ||
94 | */ | ||
95 | public void setForceObjectType(boolean newForceObjectType) { | ||
96 | boolean oldForceObjectType = forceObjectType; | ||
97 | forceObjectType = newForceObjectType; | ||
98 | if (eNotificationRequired()) | ||
99 | eNotify(new ENotificationImpl(this, Notification.SET, | ||
100 | SolverLanguagePackage.TYPE_REFERENCE__FORCE_OBJECT_TYPE, oldForceObjectType, forceObjectType)); | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | public Symbol getType() { | ||
109 | if (type != null && type.eIsProxy()) { | ||
110 | InternalEObject oldType = (InternalEObject) type; | ||
111 | type = (Symbol) eResolveProxy(oldType); | ||
112 | if (type != oldType) { | ||
113 | if (eNotificationRequired()) | ||
114 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, | ||
115 | SolverLanguagePackage.TYPE_REFERENCE__TYPE, oldType, type)); | ||
116 | } | ||
117 | } | ||
118 | return type; | ||
119 | } | ||
120 | |||
121 | /** | ||
122 | * <!-- begin-user-doc --> | ||
123 | * <!-- end-user-doc --> | ||
124 | * @generated | ||
125 | */ | ||
126 | public Symbol basicGetType() { | ||
127 | return type; | ||
128 | } | ||
129 | |||
130 | /** | ||
131 | * <!-- begin-user-doc --> | ||
132 | * <!-- end-user-doc --> | ||
133 | * @generated | ||
134 | */ | ||
135 | public void setType(Symbol newType) { | ||
136 | Symbol oldType = type; | ||
137 | type = newType; | ||
138 | if (eNotificationRequired()) | ||
139 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.TYPE_REFERENCE__TYPE, oldType, | ||
140 | type)); | ||
141 | } | ||
142 | |||
143 | /** | ||
144 | * <!-- begin-user-doc --> | ||
145 | * <!-- end-user-doc --> | ||
146 | * @generated | ||
147 | */ | ||
148 | @Override | ||
149 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
150 | switch (featureID) { | ||
151 | case SolverLanguagePackage.TYPE_REFERENCE__FORCE_OBJECT_TYPE: | ||
152 | return isForceObjectType(); | ||
153 | case SolverLanguagePackage.TYPE_REFERENCE__TYPE: | ||
154 | if (resolve) | ||
155 | return getType(); | ||
156 | return basicGetType(); | ||
157 | } | ||
158 | return super.eGet(featureID, resolve, coreType); | ||
159 | } | ||
160 | |||
161 | /** | ||
162 | * <!-- begin-user-doc --> | ||
163 | * <!-- end-user-doc --> | ||
164 | * @generated | ||
165 | */ | ||
166 | @Override | ||
167 | public void eSet(int featureID, Object newValue) { | ||
168 | switch (featureID) { | ||
169 | case SolverLanguagePackage.TYPE_REFERENCE__FORCE_OBJECT_TYPE: | ||
170 | setForceObjectType((Boolean) newValue); | ||
171 | return; | ||
172 | case SolverLanguagePackage.TYPE_REFERENCE__TYPE: | ||
173 | setType((Symbol) newValue); | ||
174 | return; | ||
175 | } | ||
176 | super.eSet(featureID, newValue); | ||
177 | } | ||
178 | |||
179 | /** | ||
180 | * <!-- begin-user-doc --> | ||
181 | * <!-- end-user-doc --> | ||
182 | * @generated | ||
183 | */ | ||
184 | @Override | ||
185 | public void eUnset(int featureID) { | ||
186 | switch (featureID) { | ||
187 | case SolverLanguagePackage.TYPE_REFERENCE__FORCE_OBJECT_TYPE: | ||
188 | setForceObjectType(FORCE_OBJECT_TYPE_EDEFAULT); | ||
189 | return; | ||
190 | case SolverLanguagePackage.TYPE_REFERENCE__TYPE: | ||
191 | setType((Symbol) null); | ||
192 | return; | ||
193 | } | ||
194 | super.eUnset(featureID); | ||
195 | } | ||
196 | |||
197 | /** | ||
198 | * <!-- begin-user-doc --> | ||
199 | * <!-- end-user-doc --> | ||
200 | * @generated | ||
201 | */ | ||
202 | @Override | ||
203 | public boolean eIsSet(int featureID) { | ||
204 | switch (featureID) { | ||
205 | case SolverLanguagePackage.TYPE_REFERENCE__FORCE_OBJECT_TYPE: | ||
206 | return forceObjectType != FORCE_OBJECT_TYPE_EDEFAULT; | ||
207 | case SolverLanguagePackage.TYPE_REFERENCE__TYPE: | ||
208 | return type != null; | ||
209 | } | ||
210 | return super.eIsSet(featureID); | ||
211 | } | ||
212 | |||
213 | /** | ||
214 | * <!-- begin-user-doc --> | ||
215 | * <!-- end-user-doc --> | ||
216 | * @generated | ||
217 | */ | ||
218 | @Override | ||
219 | public String toString() { | ||
220 | if (eIsProxy()) | ||
221 | return super.toString(); | ||
222 | |||
223 | StringBuilder result = new StringBuilder(super.toString()); | ||
224 | result.append(" (forceObjectType: "); | ||
225 | result.append(forceObjectType); | ||
226 | result.append(')'); | ||
227 | return result.toString(); | ||
228 | } | ||
229 | |||
230 | } //TypeReferenceImpl | ||