diff options
Diffstat (limited to 'Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFunctionAsTermImpl.java')
-rw-r--r-- | Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFunctionAsTermImpl.java | 240 |
1 files changed, 240 insertions, 0 deletions
diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFunctionAsTermImpl.java b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFunctionAsTermImpl.java new file mode 100644 index 00000000..1df29e68 --- /dev/null +++ b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/src-gen/ca/mcgill/ecse/dslreasoner/vampireLanguage/impl/VLSFunctionAsTermImpl.java | |||
@@ -0,0 +1,240 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.14.0 | ||
3 | */ | ||
4 | package ca.mcgill.ecse.dslreasoner.vampireLanguage.impl; | ||
5 | |||
6 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFunctionAsTerm; | ||
7 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTerm; | ||
8 | import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage; | ||
9 | |||
10 | import java.util.Collection; | ||
11 | |||
12 | import org.eclipse.emf.common.notify.Notification; | ||
13 | import org.eclipse.emf.common.notify.NotificationChain; | ||
14 | |||
15 | import org.eclipse.emf.common.util.EList; | ||
16 | |||
17 | import org.eclipse.emf.ecore.EClass; | ||
18 | import org.eclipse.emf.ecore.InternalEObject; | ||
19 | |||
20 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
21 | |||
22 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
23 | import org.eclipse.emf.ecore.util.InternalEList; | ||
24 | |||
25 | /** | ||
26 | * <!-- begin-user-doc --> | ||
27 | * An implementation of the model object '<em><b>VLS Function As Term</b></em>'. | ||
28 | * <!-- end-user-doc --> | ||
29 | * <p> | ||
30 | * The following features are implemented: | ||
31 | * </p> | ||
32 | * <ul> | ||
33 | * <li>{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.impl.VLSFunctionAsTermImpl#getFunctor <em>Functor</em>}</li> | ||
34 | * <li>{@link ca.mcgill.ecse.dslreasoner.vampireLanguage.impl.VLSFunctionAsTermImpl#getTerms <em>Terms</em>}</li> | ||
35 | * </ul> | ||
36 | * | ||
37 | * @generated | ||
38 | */ | ||
39 | public class VLSFunctionAsTermImpl extends VLSTermImpl implements VLSFunctionAsTerm | ||
40 | { | ||
41 | /** | ||
42 | * The default value of the '{@link #getFunctor() <em>Functor</em>}' attribute. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @see #getFunctor() | ||
46 | * @generated | ||
47 | * @ordered | ||
48 | */ | ||
49 | protected static final String FUNCTOR_EDEFAULT = null; | ||
50 | |||
51 | /** | ||
52 | * The cached value of the '{@link #getFunctor() <em>Functor</em>}' attribute. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @see #getFunctor() | ||
56 | * @generated | ||
57 | * @ordered | ||
58 | */ | ||
59 | protected String functor = FUNCTOR_EDEFAULT; | ||
60 | |||
61 | /** | ||
62 | * The cached value of the '{@link #getTerms() <em>Terms</em>}' containment reference list. | ||
63 | * <!-- begin-user-doc --> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @see #getTerms() | ||
66 | * @generated | ||
67 | * @ordered | ||
68 | */ | ||
69 | protected EList<VLSTerm> terms; | ||
70 | |||
71 | /** | ||
72 | * <!-- begin-user-doc --> | ||
73 | * <!-- end-user-doc --> | ||
74 | * @generated | ||
75 | */ | ||
76 | protected VLSFunctionAsTermImpl() | ||
77 | { | ||
78 | super(); | ||
79 | } | ||
80 | |||
81 | /** | ||
82 | * <!-- begin-user-doc --> | ||
83 | * <!-- end-user-doc --> | ||
84 | * @generated | ||
85 | */ | ||
86 | @Override | ||
87 | protected EClass eStaticClass() | ||
88 | { | ||
89 | return VampireLanguagePackage.Literals.VLS_FUNCTION_AS_TERM; | ||
90 | } | ||
91 | |||
92 | /** | ||
93 | * <!-- begin-user-doc --> | ||
94 | * <!-- end-user-doc --> | ||
95 | * @generated | ||
96 | */ | ||
97 | public String getFunctor() | ||
98 | { | ||
99 | return functor; | ||
100 | } | ||
101 | |||
102 | /** | ||
103 | * <!-- begin-user-doc --> | ||
104 | * <!-- end-user-doc --> | ||
105 | * @generated | ||
106 | */ | ||
107 | public void setFunctor(String newFunctor) | ||
108 | { | ||
109 | String oldFunctor = functor; | ||
110 | functor = newFunctor; | ||
111 | if (eNotificationRequired()) | ||
112 | eNotify(new ENotificationImpl(this, Notification.SET, VampireLanguagePackage.VLS_FUNCTION_AS_TERM__FUNCTOR, oldFunctor, functor)); | ||
113 | } | ||
114 | |||
115 | /** | ||
116 | * <!-- begin-user-doc --> | ||
117 | * <!-- end-user-doc --> | ||
118 | * @generated | ||
119 | */ | ||
120 | public EList<VLSTerm> getTerms() | ||
121 | { | ||
122 | if (terms == null) | ||
123 | { | ||
124 | terms = new EObjectContainmentEList<VLSTerm>(VLSTerm.class, this, VampireLanguagePackage.VLS_FUNCTION_AS_TERM__TERMS); | ||
125 | } | ||
126 | return terms; | ||
127 | } | ||
128 | |||
129 | /** | ||
130 | * <!-- begin-user-doc --> | ||
131 | * <!-- end-user-doc --> | ||
132 | * @generated | ||
133 | */ | ||
134 | @Override | ||
135 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) | ||
136 | { | ||
137 | switch (featureID) | ||
138 | { | ||
139 | case VampireLanguagePackage.VLS_FUNCTION_AS_TERM__TERMS: | ||
140 | return ((InternalEList<?>)getTerms()).basicRemove(otherEnd, msgs); | ||
141 | } | ||
142 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
143 | } | ||
144 | |||
145 | /** | ||
146 | * <!-- begin-user-doc --> | ||
147 | * <!-- end-user-doc --> | ||
148 | * @generated | ||
149 | */ | ||
150 | @Override | ||
151 | public Object eGet(int featureID, boolean resolve, boolean coreType) | ||
152 | { | ||
153 | switch (featureID) | ||
154 | { | ||
155 | case VampireLanguagePackage.VLS_FUNCTION_AS_TERM__FUNCTOR: | ||
156 | return getFunctor(); | ||
157 | case VampireLanguagePackage.VLS_FUNCTION_AS_TERM__TERMS: | ||
158 | return getTerms(); | ||
159 | } | ||
160 | return super.eGet(featureID, resolve, coreType); | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * <!-- begin-user-doc --> | ||
165 | * <!-- end-user-doc --> | ||
166 | * @generated | ||
167 | */ | ||
168 | @SuppressWarnings("unchecked") | ||
169 | @Override | ||
170 | public void eSet(int featureID, Object newValue) | ||
171 | { | ||
172 | switch (featureID) | ||
173 | { | ||
174 | case VampireLanguagePackage.VLS_FUNCTION_AS_TERM__FUNCTOR: | ||
175 | setFunctor((String)newValue); | ||
176 | return; | ||
177 | case VampireLanguagePackage.VLS_FUNCTION_AS_TERM__TERMS: | ||
178 | getTerms().clear(); | ||
179 | getTerms().addAll((Collection<? extends VLSTerm>)newValue); | ||
180 | return; | ||
181 | } | ||
182 | super.eSet(featureID, newValue); | ||
183 | } | ||
184 | |||
185 | /** | ||
186 | * <!-- begin-user-doc --> | ||
187 | * <!-- end-user-doc --> | ||
188 | * @generated | ||
189 | */ | ||
190 | @Override | ||
191 | public void eUnset(int featureID) | ||
192 | { | ||
193 | switch (featureID) | ||
194 | { | ||
195 | case VampireLanguagePackage.VLS_FUNCTION_AS_TERM__FUNCTOR: | ||
196 | setFunctor(FUNCTOR_EDEFAULT); | ||
197 | return; | ||
198 | case VampireLanguagePackage.VLS_FUNCTION_AS_TERM__TERMS: | ||
199 | getTerms().clear(); | ||
200 | return; | ||
201 | } | ||
202 | super.eUnset(featureID); | ||
203 | } | ||
204 | |||
205 | /** | ||
206 | * <!-- begin-user-doc --> | ||
207 | * <!-- end-user-doc --> | ||
208 | * @generated | ||
209 | */ | ||
210 | @Override | ||
211 | public boolean eIsSet(int featureID) | ||
212 | { | ||
213 | switch (featureID) | ||
214 | { | ||
215 | case VampireLanguagePackage.VLS_FUNCTION_AS_TERM__FUNCTOR: | ||
216 | return FUNCTOR_EDEFAULT == null ? functor != null : !FUNCTOR_EDEFAULT.equals(functor); | ||
217 | case VampireLanguagePackage.VLS_FUNCTION_AS_TERM__TERMS: | ||
218 | return terms != null && !terms.isEmpty(); | ||
219 | } | ||
220 | return super.eIsSet(featureID); | ||
221 | } | ||
222 | |||
223 | /** | ||
224 | * <!-- begin-user-doc --> | ||
225 | * <!-- end-user-doc --> | ||
226 | * @generated | ||
227 | */ | ||
228 | @Override | ||
229 | public String toString() | ||
230 | { | ||
231 | if (eIsProxy()) return super.toString(); | ||
232 | |||
233 | StringBuilder result = new StringBuilder(super.toString()); | ||
234 | result.append(" (functor: "); | ||
235 | result.append(functor); | ||
236 | result.append(')'); | ||
237 | return result.toString(); | ||
238 | } | ||
239 | |||
240 | } //VLSFunctionAsTermImpl | ||