KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > codegen > ecore > genmodel > util > GenModelAdapterFactory


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2002-2004 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: GenModelAdapterFactory.java,v 1.5 2005/06/08 06:18:44 nickb Exp $
16  */

17 package org.eclipse.emf.codegen.ecore.genmodel.util;
18
19
20 import org.eclipse.emf.codegen.ecore.genmodel.*;
21 import org.eclipse.emf.common.notify.Adapter;
22 import org.eclipse.emf.common.notify.Notifier;
23 import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
24 import org.eclipse.emf.ecore.EObject;
25
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 org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage
33  * @generated
34  */

35 public class GenModelAdapterFactory extends AdapterFactoryImpl
36 {
37
38   /**
39    * The cached model package.
40    * <!-- begin-user-doc -->
41    * <!-- end-user-doc -->
42    * @generated
43    */

44   protected static GenModelPackage modelPackage;
45
46   /**
47    * Creates an instance of the adapter factory.
48    * <!-- begin-user-doc -->
49    * <!-- end-user-doc -->
50    * @generated
51    */

52   public GenModelAdapterFactory()
53   {
54     if (modelPackage == null)
55     {
56       modelPackage = GenModelPackage.eINSTANCE;
57     }
58   }
59
60   /**
61    * Returns whether this factory is applicable for the type of the object.
62    * <!-- begin-user-doc -->
63    * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
64    * <!-- end-user-doc -->
65    * @return whether this factory is applicable for the type of the object.
66    * @generated
67    */

68   public boolean isFactoryForType(Object JavaDoc object)
69   {
70     if (object == modelPackage)
71     {
72       return true;
73     }
74     if (object instanceof EObject)
75     {
76       return ((EObject)object).eClass().getEPackage() == modelPackage;
77     }
78     return false;
79   }
80
81   /**
82    * The switch the delegates to the <code>createXXX</code> methods.
83    * <!-- begin-user-doc -->
84    * <!-- end-user-doc -->
85    * @generated
86    */

87   protected GenModelSwitch modelSwitch =
88     new GenModelSwitch()
89     {
90       public Object JavaDoc caseGenModel(GenModel object)
91       {
92         return createGenModelAdapter();
93       }
94       public Object JavaDoc caseGenPackage(GenPackage object)
95       {
96         return createGenPackageAdapter();
97       }
98       public Object JavaDoc caseGenClass(GenClass object)
99       {
100         return createGenClassAdapter();
101       }
102       public Object JavaDoc caseGenFeature(GenFeature object)
103       {
104         return createGenFeatureAdapter();
105       }
106       public Object JavaDoc caseGenBase(GenBase object)
107       {
108         return createGenBaseAdapter();
109       }
110       public Object JavaDoc caseGenEnum(GenEnum object)
111       {
112         return createGenEnumAdapter();
113       }
114       public Object JavaDoc caseGenEnumLiteral(GenEnumLiteral object)
115       {
116         return createGenEnumLiteralAdapter();
117       }
118       public Object JavaDoc caseGenClassifier(GenClassifier object)
119       {
120         return createGenClassifierAdapter();
121       }
122       public Object JavaDoc caseGenDataType(GenDataType object)
123       {
124         return createGenDataTypeAdapter();
125       }
126       public Object JavaDoc caseGenOperation(GenOperation object)
127       {
128         return createGenOperationAdapter();
129       }
130       public Object JavaDoc caseGenParameter(GenParameter object)
131       {
132         return createGenParameterAdapter();
133       }
134       public Object JavaDoc caseGenTypedElement(GenTypedElement object)
135       {
136         return createGenTypedElementAdapter();
137       }
138       public Object JavaDoc defaultCase(EObject object)
139       {
140         return createEObjectAdapter();
141       }
142     };
143
144   /**
145    * Creates an adapter for the <code>target</code>.
146    * <!-- begin-user-doc -->
147    * <!-- end-user-doc -->
148    * @param target the object to adapt.
149    * @return the adapter for the <code>target</code>.
150    * @generated
151    */

152   public Adapter createAdapter(Notifier target)
153   {
154     return (Adapter)modelSwitch.doSwitch((EObject)target);
155   }
156
157
158   /**
159    * Creates a new adapter for an object of class '{@link org.eclipse.emf.codegen.ecore.genmodel.GenModel <em>Gen Model</em>}'.
160    * <!-- begin-user-doc -->
161    * This default implementation returns null so that we can easily ignore cases;
162    * it's useful to ignore a case when inheritance will catch all the cases anyway.
163    * <!-- end-user-doc -->
164    * @return the new adapter.
165    * @see org.eclipse.emf.codegen.ecore.genmodel.GenModel
166    * @generated
167    */

168   public Adapter createGenModelAdapter()
169   {
170     return null;
171   }
172
173   /**
174    * Creates a new adapter for an object of class '{@link org.eclipse.emf.codegen.ecore.genmodel.GenPackage <em>Gen Package</em>}'.
175    * <!-- begin-user-doc -->
176    * This default implementation returns null so that we can easily ignore cases;
177    * it's useful to ignore a case when inheritance will catch all the cases anyway.
178    * <!-- end-user-doc -->
179    * @return the new adapter.
180    * @see org.eclipse.emf.codegen.ecore.genmodel.GenPackage
181    * @generated
182    */

183   public Adapter createGenPackageAdapter()
184   {
185     return null;
186   }
187
188   /**
189    * Creates a new adapter for an object of class '{@link org.eclipse.emf.codegen.ecore.genmodel.GenClass <em>Gen Class</em>}'.
190    * <!-- begin-user-doc -->
191    * This default implementation returns null so that we can easily ignore cases;
192    * it's useful to ignore a case when inheritance will catch all the cases anyway.
193    * <!-- end-user-doc -->
194    * @return the new adapter.
195    * @see org.eclipse.emf.codegen.ecore.genmodel.GenClass
196    * @generated
197    */

198   public Adapter createGenClassAdapter()
199   {
200     return null;
201   }
202
203   /**
204    * Creates a new adapter for an object of class '{@link org.eclipse.emf.codegen.ecore.genmodel.GenFeature <em>Gen Feature</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 org.eclipse.emf.codegen.ecore.genmodel.GenFeature
211    * @generated
212    */

213   public Adapter createGenFeatureAdapter()
214   {
215     return null;
216   }
217
218   /**
219    * Creates a new adapter for an object of class '{@link org.eclipse.emf.codegen.ecore.genmodel.GenBase <em>Gen Base</em>}'.
220    * <!-- begin-user-doc -->
221    * This default implementation returns null so that we can easily ignore cases;
222    * it's useful to ignore a case when inheritance will catch all the cases anyway.
223    * <!-- end-user-doc -->
224    * @return the new adapter.
225    * @see org.eclipse.emf.codegen.ecore.genmodel.GenBase
226    * @generated
227    */

228   public Adapter createGenBaseAdapter()
229   {
230     return null;
231   }
232
233   /**
234    * Creates a new adapter for an object of class '{@link org.eclipse.emf.codegen.ecore.genmodel.GenEnum <em>Gen Enum</em>}'.
235    * <!-- begin-user-doc -->
236    * This default implementation returns null so that we can easily ignore cases;
237    * it's useful to ignore a case when inheritance will catch all the cases anyway.
238    * <!-- end-user-doc -->
239    * @return the new adapter.
240    * @see org.eclipse.emf.codegen.ecore.genmodel.GenEnum
241    * @generated
242    */

243   public Adapter createGenEnumAdapter()
244   {
245     return null;
246   }
247
248   /**
249    * Creates a new adapter for an object of class '{@link org.eclipse.emf.codegen.ecore.genmodel.GenEnumLiteral <em>Gen Enum Literal</em>}'.
250    * <!-- begin-user-doc -->
251    * This default implementation returns null so that we can easily ignore cases;
252    * it's useful to ignore a case when inheritance will catch all the cases anyway.
253    * <!-- end-user-doc -->
254    * @return the new adapter.
255    * @see org.eclipse.emf.codegen.ecore.genmodel.GenEnumLiteral
256    * @generated
257    */

258   public Adapter createGenEnumLiteralAdapter()
259   {
260     return null;
261   }
262
263   /**
264    * Creates a new adapter for an object of class '{@link org.eclipse.emf.codegen.ecore.genmodel.GenClassifier <em>Gen Classifier</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 org.eclipse.emf.codegen.ecore.genmodel.GenClassifier
271    * @generated
272    */

273   public Adapter createGenClassifierAdapter()
274   {
275     return null;
276   }
277
278   /**
279    * Creates a new adapter for an object of class '{@link org.eclipse.emf.codegen.ecore.genmodel.GenDataType <em>Gen Data Type</em>}'.
280    * <!-- begin-user-doc -->
281    * This default implementation returns null so that we can easily ignore cases;
282    * it's useful to ignore a case when inheritance will catch all the cases anyway.
283    * <!-- end-user-doc -->
284    * @return the new adapter.
285    * @see org.eclipse.emf.codegen.ecore.genmodel.GenDataType
286    * @generated
287    */

288   public Adapter createGenDataTypeAdapter()
289   {
290     return null;
291   }
292
293   /**
294    * Creates a new adapter for an object of class '{@link org.eclipse.emf.codegen.ecore.genmodel.GenOperation <em>Gen Operation</em>}'.
295    * <!-- begin-user-doc -->
296    * This default implementation returns null so that we can easily ignore cases;
297    * it's useful to ignore a case when inheritance will catch all the cases anyway.
298    * <!-- end-user-doc -->
299    * @return the new adapter.
300    * @see org.eclipse.emf.codegen.ecore.genmodel.GenOperation
301    * @generated
302    */

303   public Adapter createGenOperationAdapter()
304   {
305     return null;
306   }
307
308   /**
309    * Creates a new adapter for an object of class '{@link org.eclipse.emf.codegen.ecore.genmodel.GenParameter <em>Gen Parameter</em>}'.
310    * <!-- begin-user-doc -->
311    * This default implementation returns null so that we can easily ignore cases;
312    * it's useful to ignore a case when inheritance will catch all the cases anyway.
313    * <!-- end-user-doc -->
314    * @return the new adapter.
315    * @see org.eclipse.emf.codegen.ecore.genmodel.GenParameter
316    * @generated
317    */

318   public Adapter createGenParameterAdapter()
319   {
320     return null;
321   }
322
323   /**
324    * Creates a new adapter for an object of class '{@link org.eclipse.emf.codegen.ecore.genmodel.GenTypedElement <em>Gen Typed Element</em>}'.
325    * <!-- begin-user-doc -->
326    * This default implementation returns null so that we can easily ignore cases;
327    * it's useful to ignore a case when inheritance will catch all the cases anyway.
328    * <!-- end-user-doc -->
329    * @return the new adapter.
330    * @see org.eclipse.emf.codegen.ecore.genmodel.GenTypedElement
331    * @generated
332    */

333   public Adapter createGenTypedElementAdapter()
334   {
335     return null;
336   }
337
338   /**
339    * Creates a new adapter for the default case.
340    * <!-- begin-user-doc -->
341    * This default implementation returns null.
342    * <!-- end-user-doc -->
343    * @return the new adapter.
344    * @generated
345    */

346   public Adapter createEObjectAdapter()
347   {
348     return null;
349   }
350
351 } //GenModelAdapterFactory
352
Popular Tags