View Javadoc

1   /**
2    * (c) Mod4j and contributors
3    *
4    * $Id$
5    */
6   package org.mod4j.crossx.mm.crossx.util;
7   
8   import org.eclipse.emf.common.notify.Adapter;
9   import org.eclipse.emf.common.notify.Notifier;
10  
11  import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
12  
13  import org.eclipse.emf.ecore.EObject;
14  
15  import org.mod4j.crossx.mm.crossx.*;
16  
17  /**
18   * <!-- begin-user-doc -->
19   * The <b>Adapter Factory</b> for the model.
20   * It provides an adapter <code>createXXX</code> method for each class of the model.
21   * <!-- end-user-doc -->
22   * @see org.mod4j.crossx.mm.crossx.CrossxPackage
23   * @generated
24   */
25  public class CrossxAdapterFactory extends AdapterFactoryImpl {
26      /**
27       * The cached model package.
28       * <!-- begin-user-doc -->
29       * <!-- end-user-doc -->
30       * @generated
31       */
32      protected static CrossxPackage modelPackage;
33  
34      /**
35       * Creates an instance of the adapter factory.
36       * <!-- begin-user-doc -->
37       * <!-- end-user-doc -->
38       * @generated
39       */
40      public CrossxAdapterFactory() {
41          if (modelPackage == null) {
42              modelPackage = CrossxPackage.eINSTANCE;
43          }
44      }
45  
46      /**
47       * Returns whether this factory is applicable for the type of the object.
48       * <!-- begin-user-doc -->
49       * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
50       * <!-- end-user-doc -->
51       * @return whether this factory is applicable for the type of the object.
52       * @generated
53       */
54      @Override
55      public boolean isFactoryForType(Object object) {
56          if (object == modelPackage) {
57              return true;
58          }
59          if (object instanceof EObject) {
60              return ((EObject)object).eClass().getEPackage() == modelPackage;
61          }
62          return false;
63      }
64  
65      /**
66       * The switch that delegates to the <code>createXXX</code> methods.
67       * <!-- begin-user-doc -->
68       * <!-- end-user-doc -->
69       * @generated
70       */
71      protected CrossxSwitch<Adapter> modelSwitch =
72          new CrossxSwitch<Adapter>() {
73              @Override
74              public Adapter caseModelInfo(ModelInfo object) {
75                  return createModelInfoAdapter();
76              }
77              @Override
78              public Adapter caseSymbol(Symbol object) {
79                  return createSymbolAdapter();
80              }
81              @Override
82              public Adapter caseSymbolProperty(SymbolProperty object) {
83                  return createSymbolPropertyAdapter();
84              }
85              @Override
86              public Adapter caseLiteralSymbolProperty(LiteralSymbolProperty object) {
87                  return createLiteralSymbolPropertyAdapter();
88              }
89              @Override
90              public Adapter caseReferenceSymbolProperty(ReferenceSymbolProperty object) {
91                  return createReferenceSymbolPropertyAdapter();
92              }
93              @Override
94              public Adapter defaultCase(EObject object) {
95                  return createEObjectAdapter();
96              }
97          };
98  
99      /**
100      * Creates an adapter for the <code>target</code>.
101      * <!-- begin-user-doc -->
102      * <!-- end-user-doc -->
103      * @param target the object to adapt.
104      * @return the adapter for the <code>target</code>.
105      * @generated
106      */
107     @Override
108     public Adapter createAdapter(Notifier target) {
109         return modelSwitch.doSwitch((EObject)target);
110     }
111 
112 
113     /**
114      * Creates a new adapter for an object of class '{@link org.mod4j.crossx.mm.crossx.ModelInfo <em>Model Info</em>}'.
115      * <!-- begin-user-doc -->
116      * This default implementation returns null so that we can easily ignore cases;
117      * it's useful to ignore a case when inheritance will catch all the cases anyway.
118      * <!-- end-user-doc -->
119      * @return the new adapter.
120      * @see org.mod4j.crossx.mm.crossx.ModelInfo
121      * @generated
122      */
123     public Adapter createModelInfoAdapter() {
124         return null;
125     }
126 
127     /**
128      * Creates a new adapter for an object of class '{@link org.mod4j.crossx.mm.crossx.Symbol <em>Symbol</em>}'.
129      * <!-- begin-user-doc -->
130      * This default implementation returns null so that we can easily ignore cases;
131      * it's useful to ignore a case when inheritance will catch all the cases anyway.
132      * <!-- end-user-doc -->
133      * @return the new adapter.
134      * @see org.mod4j.crossx.mm.crossx.Symbol
135      * @generated
136      */
137     public Adapter createSymbolAdapter() {
138         return null;
139     }
140 
141     /**
142      * Creates a new adapter for an object of class '{@link org.mod4j.crossx.mm.crossx.SymbolProperty <em>Symbol Property</em>}'.
143      * <!-- begin-user-doc -->
144      * This default implementation returns null so that we can easily ignore cases;
145      * it's useful to ignore a case when inheritance will catch all the cases anyway.
146      * <!-- end-user-doc -->
147      * @return the new adapter.
148      * @see org.mod4j.crossx.mm.crossx.SymbolProperty
149      * @generated
150      */
151     public Adapter createSymbolPropertyAdapter() {
152         return null;
153     }
154 
155     /**
156      * Creates a new adapter for an object of class '{@link org.mod4j.crossx.mm.crossx.LiteralSymbolProperty <em>Literal Symbol Property</em>}'.
157      * <!-- begin-user-doc -->
158      * This default implementation returns null so that we can easily ignore cases;
159      * it's useful to ignore a case when inheritance will catch all the cases anyway.
160      * <!-- end-user-doc -->
161      * @return the new adapter.
162      * @see org.mod4j.crossx.mm.crossx.LiteralSymbolProperty
163      * @generated
164      */
165     public Adapter createLiteralSymbolPropertyAdapter() {
166         return null;
167     }
168 
169     /**
170      * Creates a new adapter for an object of class '{@link org.mod4j.crossx.mm.crossx.ReferenceSymbolProperty <em>Reference Symbol Property</em>}'.
171      * <!-- begin-user-doc -->
172      * This default implementation returns null so that we can easily ignore cases;
173      * it's useful to ignore a case when inheritance will catch all the cases anyway.
174      * <!-- end-user-doc -->
175      * @return the new adapter.
176      * @see org.mod4j.crossx.mm.crossx.ReferenceSymbolProperty
177      * @generated
178      */
179     public Adapter createReferenceSymbolPropertyAdapter() {
180         return null;
181     }
182 
183     /**
184      * Creates a new adapter for the default case.
185      * <!-- begin-user-doc -->
186      * This default implementation returns null.
187      * <!-- end-user-doc -->
188      * @return the new adapter.
189      * @generated
190      */
191     public Adapter createEObjectAdapter() {
192         return null;
193     }
194 
195 } //CrossxAdapterFactory