001 /**
002 * <copyright>
003 * </copyright>
004 *
005 * $Id$
006 */
007 package com.hammurapi.config.util;
008
009 import com.hammurapi.config.*;
010
011 import com.hammurapi.party.CommonObject;
012 import org.eclipse.emf.common.notify.Adapter;
013 import org.eclipse.emf.common.notify.Notifier;
014
015 import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
016
017 import org.eclipse.emf.ecore.EObject;
018
019 /**
020 * <!-- begin-user-doc -->
021 * The <b>Adapter Factory</b> for the model.
022 * It provides an adapter <code>createXXX</code> method for each class of the model.
023 * <!-- end-user-doc -->
024 * @see com.hammurapi.config.ConfigPackage
025 * @generated
026 */
027 public class ConfigAdapterFactory extends AdapterFactoryImpl {
028 /**
029 * The cached model package.
030 * <!-- begin-user-doc -->
031 * <!-- end-user-doc -->
032 * @generated
033 */
034 protected static ConfigPackage modelPackage;
035
036 /**
037 * Creates an instance of the adapter factory.
038 * <!-- begin-user-doc -->
039 * <!-- end-user-doc -->
040 * @generated
041 */
042 public ConfigAdapterFactory() {
043 if (modelPackage == null) {
044 modelPackage = ConfigPackage.eINSTANCE;
045 }
046 }
047
048 /**
049 * Returns whether this factory is applicable for the type of the object.
050 * <!-- begin-user-doc -->
051 * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
052 * <!-- end-user-doc -->
053 * @return whether this factory is applicable for the type of the object.
054 * @generated
055 */
056 @Override
057 public boolean isFactoryForType(Object object) {
058 if (object == modelPackage) {
059 return true;
060 }
061 if (object instanceof EObject) {
062 return ((EObject)object).eClass().getEPackage() == modelPackage;
063 }
064 return false;
065 }
066
067 /**
068 * The switch that delegates to the <code>createXXX</code> methods.
069 * <!-- begin-user-doc -->
070 * <!-- end-user-doc -->
071 * @generated
072 */
073 protected ConfigSwitch<Adapter> modelSwitch =
074 new ConfigSwitch<Adapter>() {
075 @Override
076 public Adapter casePath(Path object) {
077 return createPathAdapter();
078 }
079 @Override
080 public Adapter caseFactory(Factory object) {
081 return createFactoryAdapter();
082 }
083 @Override
084 public Adapter caseProfile(Profile object) {
085 return createProfileAdapter();
086 }
087 @Override
088 public Adapter caseObjectDefinition(ObjectDefinition object) {
089 return createObjectDefinitionAdapter();
090 }
091 @Override
092 public Adapter caseCollection(Collection object) {
093 return createCollectionAdapter();
094 }
095 @Override
096 public Adapter caseConstructor(Constructor object) {
097 return createConstructorAdapter();
098 }
099 @Override
100 public Adapter caseMap(Map object) {
101 return createMapAdapter();
102 }
103 @Override
104 public Adapter caseMapEntry(MapEntry object) {
105 return createMapEntryAdapter();
106 }
107 @Override
108 public Adapter caseReference(Reference object) {
109 return createReferenceAdapter();
110 }
111 @Override
112 public Adapter casePropertySource(PropertySource object) {
113 return createPropertySourceAdapter();
114 }
115 @Override
116 public Adapter caseNull(Null object) {
117 return createNullAdapter();
118 }
119 @Override
120 public Adapter caseScript(Script object) {
121 return createScriptAdapter();
122 }
123 @Override
124 public Adapter caseNamedReference(NamedReference object) {
125 return createNamedReferenceAdapter();
126 }
127 @Override
128 public Adapter caseNamedObjectDefinition(NamedObjectDefinition object) {
129 return createNamedObjectDefinitionAdapter();
130 }
131 @Override
132 public Adapter caseNamedCollection(NamedCollection object) {
133 return createNamedCollectionAdapter();
134 }
135 @Override
136 public Adapter caseNamedMap(NamedMap object) {
137 return createNamedMapAdapter();
138 }
139 @Override
140 public Adapter caseNamed(Named object) {
141 return createNamedAdapter();
142 }
143 @Override
144 public Adapter caseMethodCall(MethodCall object) {
145 return createMethodCallAdapter();
146 }
147 @Override
148 public Adapter caseNamedScript(NamedScript object) {
149 return createNamedScriptAdapter();
150 }
151 @Override
152 public Adapter caseSource(Source object) {
153 return createSourceAdapter();
154 }
155 @Override
156 public Adapter caseCommonObject(CommonObject object) {
157 return createCommonObjectAdapter();
158 }
159 @Override
160 public Adapter defaultCase(EObject object) {
161 return createEObjectAdapter();
162 }
163 };
164
165 /**
166 * Creates an adapter for the <code>target</code>.
167 * <!-- begin-user-doc -->
168 * <!-- end-user-doc -->
169 * @param target the object to adapt.
170 * @return the adapter for the <code>target</code>.
171 * @generated
172 */
173 @Override
174 public Adapter createAdapter(Notifier target) {
175 return modelSwitch.doSwitch((EObject)target);
176 }
177
178
179 /**
180 * Creates a new adapter for an object of class '{@link com.hammurapi.config.Path <em>Path</em>}'.
181 * <!-- begin-user-doc -->
182 * This default implementation returns null so that we can easily ignore cases;
183 * it's useful to ignore a case when inheritance will catch all the cases anyway.
184 * <!-- end-user-doc -->
185 * @return the new adapter.
186 * @see com.hammurapi.config.Path
187 * @generated
188 */
189 public Adapter createPathAdapter() {
190 return null;
191 }
192
193 /**
194 * Creates a new adapter for an object of class '{@link com.hammurapi.config.Factory <em>Factory</em>}'.
195 * <!-- begin-user-doc -->
196 * This default implementation returns null so that we can easily ignore cases;
197 * it's useful to ignore a case when inheritance will catch all the cases anyway.
198 * <!-- end-user-doc -->
199 * @return the new adapter.
200 * @see com.hammurapi.config.Factory
201 * @generated
202 */
203 public Adapter createFactoryAdapter() {
204 return null;
205 }
206
207 /**
208 * Creates a new adapter for an object of class '{@link com.hammurapi.config.Profile <em>Profile</em>}'.
209 * <!-- begin-user-doc -->
210 * This default implementation returns null so that we can easily ignore cases;
211 * it's useful to ignore a case when inheritance will catch all the cases anyway.
212 * <!-- end-user-doc -->
213 * @return the new adapter.
214 * @see com.hammurapi.config.Profile
215 * @generated
216 */
217 public Adapter createProfileAdapter() {
218 return null;
219 }
220
221 /**
222 * Creates a new adapter for an object of class '{@link com.hammurapi.config.ObjectDefinition <em>Object Definition</em>}'.
223 * <!-- begin-user-doc -->
224 * This default implementation returns null so that we can easily ignore cases;
225 * it's useful to ignore a case when inheritance will catch all the cases anyway.
226 * <!-- end-user-doc -->
227 * @return the new adapter.
228 * @see com.hammurapi.config.ObjectDefinition
229 * @generated
230 */
231 public Adapter createObjectDefinitionAdapter() {
232 return null;
233 }
234
235 /**
236 * Creates a new adapter for an object of class '{@link com.hammurapi.config.Collection <em>Collection</em>}'.
237 * <!-- begin-user-doc -->
238 * This default implementation returns null so that we can easily ignore cases;
239 * it's useful to ignore a case when inheritance will catch all the cases anyway.
240 * <!-- end-user-doc -->
241 * @return the new adapter.
242 * @see com.hammurapi.config.Collection
243 * @generated
244 */
245 public Adapter createCollectionAdapter() {
246 return null;
247 }
248
249 /**
250 * Creates a new adapter for an object of class '{@link com.hammurapi.config.Constructor <em>Constructor</em>}'.
251 * <!-- begin-user-doc -->
252 * This default implementation returns null so that we can easily ignore cases;
253 * it's useful to ignore a case when inheritance will catch all the cases anyway.
254 * <!-- end-user-doc -->
255 * @return the new adapter.
256 * @see com.hammurapi.config.Constructor
257 * @generated
258 */
259 public Adapter createConstructorAdapter() {
260 return null;
261 }
262
263 /**
264 * Creates a new adapter for an object of class '{@link com.hammurapi.config.Map <em>Map</em>}'.
265 * <!-- begin-user-doc -->
266 * This default implementation returns null so that we can easily ignore cases;
267 * it's useful to ignore a case when inheritance will catch all the cases anyway.
268 * <!-- end-user-doc -->
269 * @return the new adapter.
270 * @see com.hammurapi.config.Map
271 * @generated
272 */
273 public Adapter createMapAdapter() {
274 return null;
275 }
276
277 /**
278 * Creates a new adapter for an object of class '{@link com.hammurapi.config.MapEntry <em>Map Entry</em>}'.
279 * <!-- begin-user-doc -->
280 * This default implementation returns null so that we can easily ignore cases;
281 * it's useful to ignore a case when inheritance will catch all the cases anyway.
282 * <!-- end-user-doc -->
283 * @return the new adapter.
284 * @see com.hammurapi.config.MapEntry
285 * @generated
286 */
287 public Adapter createMapEntryAdapter() {
288 return null;
289 }
290
291 /**
292 * Creates a new adapter for an object of class '{@link com.hammurapi.config.Reference <em>Reference</em>}'.
293 * <!-- begin-user-doc -->
294 * This default implementation returns null so that we can easily ignore cases;
295 * it's useful to ignore a case when inheritance will catch all the cases anyway.
296 * <!-- end-user-doc -->
297 * @return the new adapter.
298 * @see com.hammurapi.config.Reference
299 * @generated
300 */
301 public Adapter createReferenceAdapter() {
302 return null;
303 }
304
305 /**
306 * Creates a new adapter for an object of class '{@link com.hammurapi.config.PropertySource <em>Property Source</em>}'.
307 * <!-- begin-user-doc -->
308 * This default implementation returns null so that we can easily ignore cases;
309 * it's useful to ignore a case when inheritance will catch all the cases anyway.
310 * <!-- end-user-doc -->
311 * @return the new adapter.
312 * @see com.hammurapi.config.PropertySource
313 * @generated
314 */
315 public Adapter createPropertySourceAdapter() {
316 return null;
317 }
318
319 /**
320 * Creates a new adapter for an object of class '{@link com.hammurapi.config.Null <em>Null</em>}'.
321 * <!-- begin-user-doc -->
322 * This default implementation returns null so that we can easily ignore cases;
323 * it's useful to ignore a case when inheritance will catch all the cases anyway.
324 * <!-- end-user-doc -->
325 * @return the new adapter.
326 * @see com.hammurapi.config.Null
327 * @generated
328 */
329 public Adapter createNullAdapter() {
330 return null;
331 }
332
333 /**
334 * Creates a new adapter for an object of class '{@link com.hammurapi.config.Script <em>Script</em>}'.
335 * <!-- begin-user-doc -->
336 * This default implementation returns null so that we can easily ignore cases;
337 * it's useful to ignore a case when inheritance will catch all the cases anyway.
338 * <!-- end-user-doc -->
339 * @return the new adapter.
340 * @see com.hammurapi.config.Script
341 * @generated
342 */
343 public Adapter createScriptAdapter() {
344 return null;
345 }
346
347 /**
348 * Creates a new adapter for an object of class '{@link com.hammurapi.config.NamedReference <em>Named Reference</em>}'.
349 * <!-- begin-user-doc -->
350 * This default implementation returns null so that we can easily ignore cases;
351 * it's useful to ignore a case when inheritance will catch all the cases anyway.
352 * <!-- end-user-doc -->
353 * @return the new adapter.
354 * @see com.hammurapi.config.NamedReference
355 * @generated
356 */
357 public Adapter createNamedReferenceAdapter() {
358 return null;
359 }
360
361 /**
362 * Creates a new adapter for an object of class '{@link com.hammurapi.config.NamedObjectDefinition <em>Named Object Definition</em>}'.
363 * <!-- begin-user-doc -->
364 * This default implementation returns null so that we can easily ignore cases;
365 * it's useful to ignore a case when inheritance will catch all the cases anyway.
366 * <!-- end-user-doc -->
367 * @return the new adapter.
368 * @see com.hammurapi.config.NamedObjectDefinition
369 * @generated
370 */
371 public Adapter createNamedObjectDefinitionAdapter() {
372 return null;
373 }
374
375 /**
376 * Creates a new adapter for an object of class '{@link com.hammurapi.config.NamedCollection <em>Named Collection</em>}'.
377 * <!-- begin-user-doc -->
378 * This default implementation returns null so that we can easily ignore cases;
379 * it's useful to ignore a case when inheritance will catch all the cases anyway.
380 * <!-- end-user-doc -->
381 * @return the new adapter.
382 * @see com.hammurapi.config.NamedCollection
383 * @generated
384 */
385 public Adapter createNamedCollectionAdapter() {
386 return null;
387 }
388
389 /**
390 * Creates a new adapter for an object of class '{@link com.hammurapi.config.NamedMap <em>Named Map</em>}'.
391 * <!-- begin-user-doc -->
392 * This default implementation returns null so that we can easily ignore cases;
393 * it's useful to ignore a case when inheritance will catch all the cases anyway.
394 * <!-- end-user-doc -->
395 * @return the new adapter.
396 * @see com.hammurapi.config.NamedMap
397 * @generated
398 */
399 public Adapter createNamedMapAdapter() {
400 return null;
401 }
402
403 /**
404 * Creates a new adapter for an object of class '{@link com.hammurapi.config.Named <em>Named</em>}'.
405 * <!-- begin-user-doc -->
406 * This default implementation returns null so that we can easily ignore cases;
407 * it's useful to ignore a case when inheritance will catch all the cases anyway.
408 * <!-- end-user-doc -->
409 * @return the new adapter.
410 * @see com.hammurapi.config.Named
411 * @generated
412 */
413 public Adapter createNamedAdapter() {
414 return null;
415 }
416
417 /**
418 * Creates a new adapter for an object of class '{@link com.hammurapi.config.MethodCall <em>Method Call</em>}'.
419 * <!-- begin-user-doc -->
420 * This default implementation returns null so that we can easily ignore cases;
421 * it's useful to ignore a case when inheritance will catch all the cases anyway.
422 * <!-- end-user-doc -->
423 * @return the new adapter.
424 * @see com.hammurapi.config.MethodCall
425 * @generated
426 */
427 public Adapter createMethodCallAdapter() {
428 return null;
429 }
430
431 /**
432 * Creates a new adapter for an object of class '{@link com.hammurapi.config.NamedScript <em>Named Script</em>}'.
433 * <!-- begin-user-doc -->
434 * This default implementation returns null so that we can easily ignore cases;
435 * it's useful to ignore a case when inheritance will catch all the cases anyway.
436 * <!-- end-user-doc -->
437 * @return the new adapter.
438 * @see com.hammurapi.config.NamedScript
439 * @generated
440 */
441 public Adapter createNamedScriptAdapter() {
442 return null;
443 }
444
445 /**
446 * Creates a new adapter for an object of class '{@link com.hammurapi.config.Source <em>Source</em>}'.
447 * <!-- begin-user-doc -->
448 * This default implementation returns null so that we can easily ignore cases;
449 * it's useful to ignore a case when inheritance will catch all the cases anyway.
450 * <!-- end-user-doc -->
451 * @return the new adapter.
452 * @see com.hammurapi.config.Source
453 * @generated
454 */
455 public Adapter createSourceAdapter() {
456 return null;
457 }
458
459 /**
460 * Creates a new adapter for an object of class '{@link com.hammurapi.party.CommonObject <em>Common Object</em>}'.
461 * <!-- begin-user-doc -->
462 * This default implementation returns null so that we can easily ignore cases;
463 * it's useful to ignore a case when inheritance will catch all the cases anyway.
464 * <!-- end-user-doc -->
465 * @return the new adapter.
466 * @see com.hammurapi.party.CommonObject
467 * @generated
468 */
469 public Adapter createCommonObjectAdapter() {
470 return null;
471 }
472
473 /**
474 * Creates a new adapter for the default case.
475 * <!-- begin-user-doc -->
476 * This default implementation returns null.
477 * <!-- end-user-doc -->
478 * @return the new adapter.
479 * @generated
480 */
481 public Adapter createEObjectAdapter() {
482 return null;
483 }
484
485 } //ConfigAdapterFactory