1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.uka.ipd.sdq.spa.resourcemodel.util; |
8 | |
9 | import org.eclipse.emf.common.notify.Adapter; |
10 | import org.eclipse.emf.common.notify.Notifier; |
11 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; |
12 | import org.eclipse.emf.ecore.EObject; |
13 | |
14 | import de.uka.ipd.sdq.spa.resourcemodel.AbstractResourceUsage; |
15 | import de.uka.ipd.sdq.spa.resourcemodel.ActiveResource; |
16 | import de.uka.ipd.sdq.spa.resourcemodel.AlternativeResourceUsage; |
17 | import de.uka.ipd.sdq.spa.resourcemodel.ContentionResource; |
18 | import de.uka.ipd.sdq.spa.resourcemodel.DelayResource; |
19 | import de.uka.ipd.sdq.spa.resourcemodel.Option; |
20 | import de.uka.ipd.sdq.spa.resourcemodel.PassiveResource; |
21 | import de.uka.ipd.sdq.spa.resourcemodel.ProcessingResource; |
22 | import de.uka.ipd.sdq.spa.resourcemodel.Resource; |
23 | import de.uka.ipd.sdq.spa.resourcemodel.ResourceModelPackage; |
24 | import de.uka.ipd.sdq.spa.resourcemodel.ResourceUsage; |
25 | import de.uka.ipd.sdq.spa.resourcemodel.SequentialResourceUsage; |
26 | |
27 | /** |
28 | * <!-- begin-user-doc --> |
29 | * The <b>Adapter Factory</b> for the model. |
30 | * It provides an adapter <code>createXXX</code> method for each class of the model. |
31 | * <!-- end-user-doc --> |
32 | * @see de.uka.ipd.sdq.spa.resourcemodel.ResourceModelPackage |
33 | * @generated |
34 | */ |
35 | public class ResourceModelAdapterFactory extends AdapterFactoryImpl { |
36 | /** |
37 | * The cached model package. |
38 | * <!-- begin-user-doc --> |
39 | * <!-- end-user-doc --> |
40 | * @generated |
41 | */ |
42 | protected static ResourceModelPackage modelPackage; |
43 | |
44 | /** |
45 | * Creates an instance of the adapter factory. |
46 | * <!-- begin-user-doc --> |
47 | * <!-- end-user-doc --> |
48 | * @generated |
49 | */ |
50 | public ResourceModelAdapterFactory() { |
51 | if (modelPackage == null) { |
52 | modelPackage = ResourceModelPackage.eINSTANCE; |
53 | } |
54 | } |
55 | |
56 | /** |
57 | * Returns whether this factory is applicable for the type of the object. |
58 | * <!-- begin-user-doc --> |
59 | * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. |
60 | * <!-- end-user-doc --> |
61 | * @return whether this factory is applicable for the type of the object. |
62 | * @generated |
63 | */ |
64 | public boolean isFactoryForType(Object object) { |
65 | if (object == modelPackage) { |
66 | return true; |
67 | } |
68 | if (object instanceof EObject) { |
69 | return ((EObject)object).eClass().getEPackage() == modelPackage; |
70 | } |
71 | return false; |
72 | } |
73 | |
74 | /** |
75 | * The switch the delegates to the <code>createXXX</code> methods. |
76 | * <!-- begin-user-doc --> |
77 | * <!-- end-user-doc --> |
78 | * @generated |
79 | */ |
80 | protected ResourceModelSwitch modelSwitch = |
81 | new ResourceModelSwitch() { |
82 | public Object caseSequentialResourceUsage(SequentialResourceUsage object) { |
83 | return createSequentialResourceUsageAdapter(); |
84 | } |
85 | public Object caseAbstractResourceUsage(AbstractResourceUsage object) { |
86 | return createAbstractResourceUsageAdapter(); |
87 | } |
88 | public Object caseResource(Resource object) { |
89 | return createResourceAdapter(); |
90 | } |
91 | public Object caseAlternativeResourceUsage(AlternativeResourceUsage object) { |
92 | return createAlternativeResourceUsageAdapter(); |
93 | } |
94 | public Object caseResourceUsage(ResourceUsage object) { |
95 | return createResourceUsageAdapter(); |
96 | } |
97 | public Object casePassiveResource(PassiveResource object) { |
98 | return createPassiveResourceAdapter(); |
99 | } |
100 | public Object caseContentionResource(ContentionResource object) { |
101 | return createContentionResourceAdapter(); |
102 | } |
103 | public Object caseProcessingResource(ProcessingResource object) { |
104 | return createProcessingResourceAdapter(); |
105 | } |
106 | public Object caseActiveResource(ActiveResource object) { |
107 | return createActiveResourceAdapter(); |
108 | } |
109 | public Object caseDelayResource(DelayResource object) { |
110 | return createDelayResourceAdapter(); |
111 | } |
112 | public Object caseOption(Option object) { |
113 | return createOptionAdapter(); |
114 | } |
115 | public Object defaultCase(EObject object) { |
116 | return createEObjectAdapter(); |
117 | } |
118 | }; |
119 | |
120 | /** |
121 | * Creates an adapter for the <code>target</code>. |
122 | * <!-- begin-user-doc --> |
123 | * <!-- end-user-doc --> |
124 | * @param target the object to adapt. |
125 | * @return the adapter for the <code>target</code>. |
126 | * @generated |
127 | */ |
128 | public Adapter createAdapter(Notifier target) { |
129 | return (Adapter)modelSwitch.doSwitch((EObject)target); |
130 | } |
131 | |
132 | |
133 | /** |
134 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.resourcemodel.SequentialResourceUsage <em>Sequential Resource Usage</em>}'. |
135 | * <!-- begin-user-doc --> |
136 | * This default implementation returns null so that we can easily ignore cases; |
137 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
138 | * <!-- end-user-doc --> |
139 | * @return the new adapter. |
140 | * @see de.uka.ipd.sdq.spa.resourcemodel.SequentialResourceUsage |
141 | * @generated |
142 | */ |
143 | public Adapter createSequentialResourceUsageAdapter() { |
144 | return null; |
145 | } |
146 | |
147 | /** |
148 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.resourcemodel.AbstractResourceUsage <em>Abstract Resource Usage</em>}'. |
149 | * <!-- begin-user-doc --> |
150 | * This default implementation returns null so that we can easily ignore cases; |
151 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
152 | * <!-- end-user-doc --> |
153 | * @return the new adapter. |
154 | * @see de.uka.ipd.sdq.spa.resourcemodel.AbstractResourceUsage |
155 | * @generated |
156 | */ |
157 | public Adapter createAbstractResourceUsageAdapter() { |
158 | return null; |
159 | } |
160 | |
161 | /** |
162 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.resourcemodel.Resource <em>Resource</em>}'. |
163 | * <!-- begin-user-doc --> |
164 | * This default implementation returns null so that we can easily ignore cases; |
165 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
166 | * <!-- end-user-doc --> |
167 | * @return the new adapter. |
168 | * @see de.uka.ipd.sdq.spa.resourcemodel.Resource |
169 | * @generated |
170 | */ |
171 | public Adapter createResourceAdapter() { |
172 | return null; |
173 | } |
174 | |
175 | /** |
176 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.resourcemodel.AlternativeResourceUsage <em>Alternative Resource Usage</em>}'. |
177 | * <!-- begin-user-doc --> |
178 | * This default implementation returns null so that we can easily ignore cases; |
179 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
180 | * <!-- end-user-doc --> |
181 | * @return the new adapter. |
182 | * @see de.uka.ipd.sdq.spa.resourcemodel.AlternativeResourceUsage |
183 | * @generated |
184 | */ |
185 | public Adapter createAlternativeResourceUsageAdapter() { |
186 | return null; |
187 | } |
188 | |
189 | /** |
190 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.resourcemodel.ResourceUsage <em>Resource Usage</em>}'. |
191 | * <!-- begin-user-doc --> |
192 | * This default implementation returns null so that we can easily ignore cases; |
193 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
194 | * <!-- end-user-doc --> |
195 | * @return the new adapter. |
196 | * @see de.uka.ipd.sdq.spa.resourcemodel.ResourceUsage |
197 | * @generated |
198 | */ |
199 | public Adapter createResourceUsageAdapter() { |
200 | return null; |
201 | } |
202 | |
203 | /** |
204 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.resourcemodel.PassiveResource <em>Passive Resource</em>}'. |
205 | * <!-- begin-user-doc --> |
206 | * This default implementation returns null so that we can easily ignore cases; |
207 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
208 | * <!-- end-user-doc --> |
209 | * @return the new adapter. |
210 | * @see de.uka.ipd.sdq.spa.resourcemodel.PassiveResource |
211 | * @generated |
212 | */ |
213 | public Adapter createPassiveResourceAdapter() { |
214 | return null; |
215 | } |
216 | |
217 | /** |
218 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.resourcemodel.ContentionResource <em>Contention Resource</em>}'. |
219 | * <!-- begin-user-doc --> |
220 | * This default implementation returns null so that we can easily ignore cases; |
221 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
222 | * <!-- end-user-doc --> |
223 | * @return the new adapter. |
224 | * @see de.uka.ipd.sdq.spa.resourcemodel.ContentionResource |
225 | * @generated |
226 | */ |
227 | public Adapter createContentionResourceAdapter() { |
228 | return null; |
229 | } |
230 | |
231 | /** |
232 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.resourcemodel.ProcessingResource <em>Processing Resource</em>}'. |
233 | * <!-- begin-user-doc --> |
234 | * This default implementation returns null so that we can easily ignore cases; |
235 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
236 | * <!-- end-user-doc --> |
237 | * @return the new adapter. |
238 | * @see de.uka.ipd.sdq.spa.resourcemodel.ProcessingResource |
239 | * @generated |
240 | */ |
241 | public Adapter createProcessingResourceAdapter() { |
242 | return null; |
243 | } |
244 | |
245 | /** |
246 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.resourcemodel.ActiveResource <em>Active Resource</em>}'. |
247 | * <!-- begin-user-doc --> |
248 | * This default implementation returns null so that we can easily ignore cases; |
249 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
250 | * <!-- end-user-doc --> |
251 | * @return the new adapter. |
252 | * @see de.uka.ipd.sdq.spa.resourcemodel.ActiveResource |
253 | * @generated |
254 | */ |
255 | public Adapter createActiveResourceAdapter() { |
256 | return null; |
257 | } |
258 | |
259 | /** |
260 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.resourcemodel.DelayResource <em>Delay Resource</em>}'. |
261 | * <!-- begin-user-doc --> |
262 | * This default implementation returns null so that we can easily ignore cases; |
263 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
264 | * <!-- end-user-doc --> |
265 | * @return the new adapter. |
266 | * @see de.uka.ipd.sdq.spa.resourcemodel.DelayResource |
267 | * @generated |
268 | */ |
269 | public Adapter createDelayResourceAdapter() { |
270 | return null; |
271 | } |
272 | |
273 | /** |
274 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.resourcemodel.Option <em>Option</em>}'. |
275 | * <!-- begin-user-doc --> |
276 | * This default implementation returns null so that we can easily ignore cases; |
277 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
278 | * <!-- end-user-doc --> |
279 | * @return the new adapter. |
280 | * @see de.uka.ipd.sdq.spa.resourcemodel.Option |
281 | * @generated |
282 | */ |
283 | public Adapter createOptionAdapter() { |
284 | return null; |
285 | } |
286 | |
287 | /** |
288 | * Creates a new adapter for the default case. |
289 | * <!-- begin-user-doc --> |
290 | * This default implementation returns null. |
291 | * <!-- end-user-doc --> |
292 | * @return the new adapter. |
293 | * @generated |
294 | */ |
295 | public Adapter createEObjectAdapter() { |
296 | return null; |
297 | } |
298 | |
299 | } //ResourceModelAdapterFactory |