diff options
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/LookupDefinitionImpl.java')
-rw-r--r-- | Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/LookupDefinitionImpl.java | 220 |
1 files changed, 220 insertions, 0 deletions
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/LookupDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/LookupDefinitionImpl.java new file mode 100644 index 00000000..f4877855 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/cftLanguage/impl/LookupDefinitionImpl.java | |||
@@ -0,0 +1,220 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.16.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl; | ||
5 | |||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition; | ||
9 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter; | ||
10 | |||
11 | import java.util.Collection; | ||
12 | |||
13 | import org.eclipse.emf.common.notify.Notification; | ||
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.EObjectResolvingEList; | ||
23 | |||
24 | /** | ||
25 | * <!-- begin-user-doc --> | ||
26 | * An implementation of the model object '<em><b>Lookup Definition</b></em>'. | ||
27 | * <!-- end-user-doc --> | ||
28 | * <p> | ||
29 | * The following features are implemented: | ||
30 | * </p> | ||
31 | * <ul> | ||
32 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.LookupDefinitionImpl#getMapping <em>Mapping</em>}</li> | ||
33 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.LookupDefinitionImpl#getArguments <em>Arguments</em>}</li> | ||
34 | * </ul> | ||
35 | * | ||
36 | * @generated | ||
37 | */ | ||
38 | public class LookupDefinitionImpl extends VariableImpl implements LookupDefinition | ||
39 | { | ||
40 | /** | ||
41 | * The cached value of the '{@link #getMapping() <em>Mapping</em>}' reference. | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @see #getMapping() | ||
45 | * @generated | ||
46 | * @ordered | ||
47 | */ | ||
48 | protected MappingDefinition mapping; | ||
49 | |||
50 | /** | ||
51 | * The cached value of the '{@link #getArguments() <em>Arguments</em>}' reference list. | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @see #getArguments() | ||
55 | * @generated | ||
56 | * @ordered | ||
57 | */ | ||
58 | protected EList<MappingParameter> arguments; | ||
59 | |||
60 | /** | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @generated | ||
64 | */ | ||
65 | protected LookupDefinitionImpl() | ||
66 | { | ||
67 | super(); | ||
68 | } | ||
69 | |||
70 | /** | ||
71 | * <!-- begin-user-doc --> | ||
72 | * <!-- end-user-doc --> | ||
73 | * @generated | ||
74 | */ | ||
75 | @Override | ||
76 | protected EClass eStaticClass() | ||
77 | { | ||
78 | return CftLanguagePackage.Literals.LOOKUP_DEFINITION; | ||
79 | } | ||
80 | |||
81 | /** | ||
82 | * <!-- begin-user-doc --> | ||
83 | * <!-- end-user-doc --> | ||
84 | * @generated | ||
85 | */ | ||
86 | @Override | ||
87 | public MappingDefinition getMapping() | ||
88 | { | ||
89 | if (mapping != null && mapping.eIsProxy()) | ||
90 | { | ||
91 | InternalEObject oldMapping = (InternalEObject)mapping; | ||
92 | mapping = (MappingDefinition)eResolveProxy(oldMapping); | ||
93 | if (mapping != oldMapping) | ||
94 | { | ||
95 | if (eNotificationRequired()) | ||
96 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, CftLanguagePackage.LOOKUP_DEFINITION__MAPPING, oldMapping, mapping)); | ||
97 | } | ||
98 | } | ||
99 | return mapping; | ||
100 | } | ||
101 | |||
102 | /** | ||
103 | * <!-- begin-user-doc --> | ||
104 | * <!-- end-user-doc --> | ||
105 | * @generated | ||
106 | */ | ||
107 | public MappingDefinition basicGetMapping() | ||
108 | { | ||
109 | return mapping; | ||
110 | } | ||
111 | |||
112 | /** | ||
113 | * <!-- begin-user-doc --> | ||
114 | * <!-- end-user-doc --> | ||
115 | * @generated | ||
116 | */ | ||
117 | @Override | ||
118 | public void setMapping(MappingDefinition newMapping) | ||
119 | { | ||
120 | MappingDefinition oldMapping = mapping; | ||
121 | mapping = newMapping; | ||
122 | if (eNotificationRequired()) | ||
123 | eNotify(new ENotificationImpl(this, Notification.SET, CftLanguagePackage.LOOKUP_DEFINITION__MAPPING, oldMapping, mapping)); | ||
124 | } | ||
125 | |||
126 | /** | ||
127 | * <!-- begin-user-doc --> | ||
128 | * <!-- end-user-doc --> | ||
129 | * @generated | ||
130 | */ | ||
131 | @Override | ||
132 | public EList<MappingParameter> getArguments() | ||
133 | { | ||
134 | if (arguments == null) | ||
135 | { | ||
136 | arguments = new EObjectResolvingEList<MappingParameter>(MappingParameter.class, this, CftLanguagePackage.LOOKUP_DEFINITION__ARGUMENTS); | ||
137 | } | ||
138 | return arguments; | ||
139 | } | ||
140 | |||
141 | /** | ||
142 | * <!-- begin-user-doc --> | ||
143 | * <!-- end-user-doc --> | ||
144 | * @generated | ||
145 | */ | ||
146 | @Override | ||
147 | public Object eGet(int featureID, boolean resolve, boolean coreType) | ||
148 | { | ||
149 | switch (featureID) | ||
150 | { | ||
151 | case CftLanguagePackage.LOOKUP_DEFINITION__MAPPING: | ||
152 | if (resolve) return getMapping(); | ||
153 | return basicGetMapping(); | ||
154 | case CftLanguagePackage.LOOKUP_DEFINITION__ARGUMENTS: | ||
155 | return getArguments(); | ||
156 | } | ||
157 | return super.eGet(featureID, resolve, coreType); | ||
158 | } | ||
159 | |||
160 | /** | ||
161 | * <!-- begin-user-doc --> | ||
162 | * <!-- end-user-doc --> | ||
163 | * @generated | ||
164 | */ | ||
165 | @SuppressWarnings("unchecked") | ||
166 | @Override | ||
167 | public void eSet(int featureID, Object newValue) | ||
168 | { | ||
169 | switch (featureID) | ||
170 | { | ||
171 | case CftLanguagePackage.LOOKUP_DEFINITION__MAPPING: | ||
172 | setMapping((MappingDefinition)newValue); | ||
173 | return; | ||
174 | case CftLanguagePackage.LOOKUP_DEFINITION__ARGUMENTS: | ||
175 | getArguments().clear(); | ||
176 | getArguments().addAll((Collection<? extends MappingParameter>)newValue); | ||
177 | return; | ||
178 | } | ||
179 | super.eSet(featureID, newValue); | ||
180 | } | ||
181 | |||
182 | /** | ||
183 | * <!-- begin-user-doc --> | ||
184 | * <!-- end-user-doc --> | ||
185 | * @generated | ||
186 | */ | ||
187 | @Override | ||
188 | public void eUnset(int featureID) | ||
189 | { | ||
190 | switch (featureID) | ||
191 | { | ||
192 | case CftLanguagePackage.LOOKUP_DEFINITION__MAPPING: | ||
193 | setMapping((MappingDefinition)null); | ||
194 | return; | ||
195 | case CftLanguagePackage.LOOKUP_DEFINITION__ARGUMENTS: | ||
196 | getArguments().clear(); | ||
197 | return; | ||
198 | } | ||
199 | super.eUnset(featureID); | ||
200 | } | ||
201 | |||
202 | /** | ||
203 | * <!-- begin-user-doc --> | ||
204 | * <!-- end-user-doc --> | ||
205 | * @generated | ||
206 | */ | ||
207 | @Override | ||
208 | public boolean eIsSet(int featureID) | ||
209 | { | ||
210 | switch (featureID) | ||
211 | { | ||
212 | case CftLanguagePackage.LOOKUP_DEFINITION__MAPPING: | ||
213 | return mapping != null; | ||
214 | case CftLanguagePackage.LOOKUP_DEFINITION__ARGUMENTS: | ||
215 | return arguments != null && !arguments.isEmpty(); | ||
216 | } | ||
217 | return super.eIsSet(featureID); | ||
218 | } | ||
219 | |||
220 | } //LookupDefinitionImpl | ||