1 /**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7 package org.mod4j.dsl.service.mm.ServiceDsl.util;
8
9 import org.eclipse.emf.common.notify.Adapter;
10 import org.eclipse.emf.common.notify.Notifier;
11
12 import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
13
14 import org.eclipse.emf.ecore.EObject;
15
16 import org.mod4j.dsl.service.mm.ServiceDsl.*;
17
18 /**
19 * <!-- begin-user-doc -->
20 * The <b>Adapter Factory</b> for the model.
21 * It provides an adapter <code>createXXX</code> method for each class of the model.
22 * <!-- end-user-doc -->
23 * @see org.mod4j.dsl.service.mm.ServiceDsl.ServiceDslPackage
24 * @generated
25 */
26 public class ServiceDslAdapterFactory extends AdapterFactoryImpl {
27 /**
28 * The cached model package.
29 * <!-- begin-user-doc -->
30 * <!-- end-user-doc -->
31 * @generated
32 */
33 protected static ServiceDslPackage modelPackage;
34
35 /**
36 * Creates an instance of the adapter factory.
37 * <!-- begin-user-doc -->
38 * <!-- end-user-doc -->
39 * @generated
40 */
41 public ServiceDslAdapterFactory() {
42 if (modelPackage == null) {
43 modelPackage = ServiceDslPackage.eINSTANCE;
44 }
45 }
46
47 /**
48 * Returns whether this factory is applicable for the type of the object.
49 * <!-- begin-user-doc -->
50 * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
51 * <!-- end-user-doc -->
52 * @return whether this factory is applicable for the type of the object.
53 * @generated
54 */
55 @Override
56 public boolean isFactoryForType(Object object) {
57 if (object == modelPackage) {
58 return true;
59 }
60 if (object instanceof EObject) {
61 return ((EObject)object).eClass().getEPackage() == modelPackage;
62 }
63 return false;
64 }
65
66 /**
67 * The switch that delegates to the <code>createXXX</code> methods.
68 * <!-- begin-user-doc -->
69 * <!-- end-user-doc -->
70 * @generated
71 */
72 protected ServiceDslSwitch<Adapter> modelSwitch =
73 new ServiceDslSwitch<Adapter>() {
74 @Override
75 public Adapter caseServiceModel(ServiceModel object) {
76 return createServiceModelAdapter();
77 }
78 @Override
79 public Adapter caseModelElement(ModelElement object) {
80 return createModelElementAdapter();
81 }
82 @Override
83 public Adapter caseDtoReference(DtoReference object) {
84 return createDtoReferenceAdapter();
85 }
86 @Override
87 public Adapter caseCustomMethod(CustomMethod object) {
88 return createCustomMethodAdapter();
89 }
90 @Override
91 public Adapter caseCrudService(CrudService object) {
92 return createCrudServiceAdapter();
93 }
94 @Override
95 public Adapter caseSpecialMethod(SpecialMethod object) {
96 return createSpecialMethodAdapter();
97 }
98 @Override
99 public Adapter caseServiceMethod(ServiceMethod object) {
100 return createServiceMethodAdapter();
101 }
102 @Override
103 public Adapter caseParameter(Parameter object) {
104 return createParameterAdapter();
105 }
106 @Override
107 public Adapter caseAssociationMethod(AssociationMethod object) {
108 return createAssociationMethodAdapter();
109 }
110 @Override
111 public Adapter defaultCase(EObject object) {
112 return createEObjectAdapter();
113 }
114 };
115
116 /**
117 * Creates an adapter for the <code>target</code>.
118 * <!-- begin-user-doc -->
119 * <!-- end-user-doc -->
120 * @param target the object to adapt.
121 * @return the adapter for the <code>target</code>.
122 * @generated
123 */
124 @Override
125 public Adapter createAdapter(Notifier target) {
126 return modelSwitch.doSwitch((EObject)target);
127 }
128
129
130 /**
131 * Creates a new adapter for an object of class '{@link org.mod4j.dsl.service.mm.ServiceDsl.ServiceModel <em>Service Model</em>}'.
132 * <!-- begin-user-doc -->
133 * This default implementation returns null so that we can easily ignore cases;
134 * it's useful to ignore a case when inheritance will catch all the cases anyway.
135 * <!-- end-user-doc -->
136 * @return the new adapter.
137 * @see org.mod4j.dsl.service.mm.ServiceDsl.ServiceModel
138 * @generated
139 */
140 public Adapter createServiceModelAdapter() {
141 return null;
142 }
143
144 /**
145 * Creates a new adapter for an object of class '{@link org.mod4j.dsl.service.mm.ServiceDsl.ModelElement <em>Model Element</em>}'.
146 * <!-- begin-user-doc -->
147 * This default implementation returns null so that we can easily ignore cases;
148 * it's useful to ignore a case when inheritance will catch all the cases anyway.
149 * <!-- end-user-doc -->
150 * @return the new adapter.
151 * @see org.mod4j.dsl.service.mm.ServiceDsl.ModelElement
152 * @generated
153 */
154 public Adapter createModelElementAdapter() {
155 return null;
156 }
157
158 /**
159 * Creates a new adapter for an object of class '{@link org.mod4j.dsl.service.mm.ServiceDsl.DtoReference <em>Dto Reference</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.mod4j.dsl.service.mm.ServiceDsl.DtoReference
166 * @generated
167 */
168 public Adapter createDtoReferenceAdapter() {
169 return null;
170 }
171
172 /**
173 * Creates a new adapter for an object of class '{@link org.mod4j.dsl.service.mm.ServiceDsl.CustomMethod <em>Custom Method</em>}'.
174 * <!-- begin-user-doc -->
175 * This default implementation returns null so that we can easily ignore cases;
176 * it's useful to ignore a case when inheritance will catch all the cases anyway.
177 * <!-- end-user-doc -->
178 * @return the new adapter.
179 * @see org.mod4j.dsl.service.mm.ServiceDsl.CustomMethod
180 * @generated
181 */
182 public Adapter createCustomMethodAdapter() {
183 return null;
184 }
185
186 /**
187 * Creates a new adapter for an object of class '{@link org.mod4j.dsl.service.mm.ServiceDsl.CrudService <em>Crud Service</em>}'.
188 * <!-- begin-user-doc -->
189 * This default implementation returns null so that we can easily ignore cases;
190 * it's useful to ignore a case when inheritance will catch all the cases anyway.
191 * <!-- end-user-doc -->
192 * @return the new adapter.
193 * @see org.mod4j.dsl.service.mm.ServiceDsl.CrudService
194 * @generated
195 */
196 public Adapter createCrudServiceAdapter() {
197 return null;
198 }
199
200 /**
201 * Creates a new adapter for an object of class '{@link org.mod4j.dsl.service.mm.ServiceDsl.SpecialMethod <em>Special Method</em>}'.
202 * <!-- begin-user-doc -->
203 * This default implementation returns null so that we can easily ignore cases;
204 * it's useful to ignore a case when inheritance will catch all the cases anyway.
205 * <!-- end-user-doc -->
206 * @return the new adapter.
207 * @see org.mod4j.dsl.service.mm.ServiceDsl.SpecialMethod
208 * @generated
209 */
210 public Adapter createSpecialMethodAdapter() {
211 return null;
212 }
213
214 /**
215 * Creates a new adapter for an object of class '{@link org.mod4j.dsl.service.mm.ServiceDsl.ServiceMethod <em>Service Method</em>}'.
216 * <!-- begin-user-doc -->
217 * This default implementation returns null so that we can easily ignore cases;
218 * it's useful to ignore a case when inheritance will catch all the cases anyway.
219 * <!-- end-user-doc -->
220 * @return the new adapter.
221 * @see org.mod4j.dsl.service.mm.ServiceDsl.ServiceMethod
222 * @generated
223 */
224 public Adapter createServiceMethodAdapter() {
225 return null;
226 }
227
228 /**
229 * Creates a new adapter for an object of class '{@link org.mod4j.dsl.service.mm.ServiceDsl.Parameter <em>Parameter</em>}'.
230 * <!-- begin-user-doc -->
231 * This default implementation returns null so that we can easily ignore cases;
232 * it's useful to ignore a case when inheritance will catch all the cases anyway.
233 * <!-- end-user-doc -->
234 * @return the new adapter.
235 * @see org.mod4j.dsl.service.mm.ServiceDsl.Parameter
236 * @generated
237 */
238 public Adapter createParameterAdapter() {
239 return null;
240 }
241
242 /**
243 * Creates a new adapter for an object of class '{@link org.mod4j.dsl.service.mm.ServiceDsl.AssociationMethod <em>Association Method</em>}'.
244 * <!-- begin-user-doc -->
245 * This default implementation returns null so that we can easily ignore cases;
246 * it's useful to ignore a case when inheritance will catch all the cases anyway.
247 * <!-- end-user-doc -->
248 * @return the new adapter.
249 * @see org.mod4j.dsl.service.mm.ServiceDsl.AssociationMethod
250 * @generated
251 */
252 public Adapter createAssociationMethodAdapter() {
253 return null;
254 }
255
256 /**
257 * Creates a new adapter for the default case.
258 * <!-- begin-user-doc -->
259 * This default implementation returns null.
260 * <!-- end-user-doc -->
261 * @return the new adapter.
262 * @generated
263 */
264 public Adapter createEObjectAdapter() {
265 return null;
266 }
267
268 } //ServiceDslAdapterFactory