001 /**
002 * <copyright>
003 * </copyright>
004 *
005 * $Id$
006 */
007 package com.hammurapi.flow.util;
008
009 import com.hammurapi.config.Factory;
010 import com.hammurapi.config.Named;
011 import com.hammurapi.config.NamedObjectDefinition;
012 import com.hammurapi.config.ObjectDefinition;
013 import com.hammurapi.config.PropertySource;
014
015 import com.hammurapi.flow.*;
016
017 import com.hammurapi.party.CommonObject;
018 import org.eclipse.emf.common.notify.Adapter;
019 import org.eclipse.emf.common.notify.Notifier;
020
021 import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
022
023 import org.eclipse.emf.ecore.EObject;
024
025 /**
026 * <!-- begin-user-doc -->
027 * The <b>Adapter Factory</b> for the model.
028 * It provides an adapter <code>createXXX</code> method for each class of the model.
029 * <!-- end-user-doc -->
030 * @see com.hammurapi.flow.FlowPackage
031 * @generated
032 */
033 public class FlowAdapterFactory extends AdapterFactoryImpl {
034 /**
035 * The cached model package.
036 * <!-- begin-user-doc -->
037 * <!-- end-user-doc -->
038 * @generated
039 */
040 protected static FlowPackage modelPackage;
041
042 /**
043 * Creates an instance of the adapter factory.
044 * <!-- begin-user-doc -->
045 * <!-- end-user-doc -->
046 * @generated
047 */
048 public FlowAdapterFactory() {
049 if (modelPackage == null) {
050 modelPackage = FlowPackage.eINSTANCE;
051 }
052 }
053
054 /**
055 * Returns whether this factory is applicable for the type of the object.
056 * <!-- begin-user-doc -->
057 * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
058 * <!-- end-user-doc -->
059 * @return whether this factory is applicable for the type of the object.
060 * @generated
061 */
062 @Override
063 public boolean isFactoryForType(Object object) {
064 if (object == modelPackage) {
065 return true;
066 }
067 if (object instanceof EObject) {
068 return ((EObject)object).eClass().getEPackage() == modelPackage;
069 }
070 return false;
071 }
072
073 /**
074 * The switch that delegates to the <code>createXXX</code> methods.
075 * <!-- begin-user-doc -->
076 * <!-- end-user-doc -->
077 * @generated
078 */
079 protected FlowSwitch<Adapter> modelSwitch =
080 new FlowSwitch<Adapter>() {
081 @Override
082 public Adapter caseFlowElement(FlowElement object) {
083 return createFlowElementAdapter();
084 }
085 @Override
086 public Adapter caseNode(Node object) {
087 return createNodeAdapter();
088 }
089 @Override
090 public Adapter caseFlow(Flow object) {
091 return createFlowAdapter();
092 }
093 @Override
094 public Adapter casePin(Pin object) {
095 return createPinAdapter();
096 }
097 @Override
098 public Adapter caseTransition(Transition object) {
099 return createTransitionAdapter();
100 }
101 @Override
102 public Adapter caseCommonObject(CommonObject object) {
103 return createCommonObjectAdapter();
104 }
105 @Override
106 public Adapter caseFactory(Factory object) {
107 return createFactoryAdapter();
108 }
109 @Override
110 public Adapter caseNamed(Named object) {
111 return createNamedAdapter();
112 }
113 @Override
114 public Adapter casePropertySource(PropertySource object) {
115 return createPropertySourceAdapter();
116 }
117 @Override
118 public Adapter caseObjectDefinition(ObjectDefinition object) {
119 return createObjectDefinitionAdapter();
120 }
121 @Override
122 public Adapter caseNamedObjectDefinition(NamedObjectDefinition object) {
123 return createNamedObjectDefinitionAdapter();
124 }
125 @Override
126 public Adapter defaultCase(EObject object) {
127 return createEObjectAdapter();
128 }
129 };
130
131 /**
132 * Creates an adapter for the <code>target</code>.
133 * <!-- begin-user-doc -->
134 * <!-- end-user-doc -->
135 * @param target the object to adapt.
136 * @return the adapter for the <code>target</code>.
137 * @generated
138 */
139 @Override
140 public Adapter createAdapter(Notifier target) {
141 return modelSwitch.doSwitch((EObject)target);
142 }
143
144
145 /**
146 * Creates a new adapter for an object of class '{@link com.hammurapi.flow.FlowElement <em>Element</em>}'.
147 * <!-- begin-user-doc -->
148 * This default implementation returns null so that we can easily ignore cases;
149 * it's useful to ignore a case when inheritance will catch all the cases anyway.
150 * <!-- end-user-doc -->
151 * @return the new adapter.
152 * @see com.hammurapi.flow.FlowElement
153 * @generated
154 */
155 public Adapter createFlowElementAdapter() {
156 return null;
157 }
158
159 /**
160 * Creates a new adapter for an object of class '{@link com.hammurapi.flow.Node <em>Node</em>}'.
161 * <!-- begin-user-doc -->
162 * This default implementation returns null so that we can easily ignore cases;
163 * it's useful to ignore a case when inheritance will catch all the cases anyway.
164 * <!-- end-user-doc -->
165 * @return the new adapter.
166 * @see com.hammurapi.flow.Node
167 * @generated
168 */
169 public Adapter createNodeAdapter() {
170 return null;
171 }
172
173 /**
174 * Creates a new adapter for an object of class '{@link com.hammurapi.flow.Flow <em>Flow</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 com.hammurapi.flow.Flow
181 * @generated
182 */
183 public Adapter createFlowAdapter() {
184 return null;
185 }
186
187 /**
188 * Creates a new adapter for an object of class '{@link com.hammurapi.flow.Pin <em>Pin</em>}'.
189 * <!-- begin-user-doc -->
190 * This default implementation returns null so that we can easily ignore cases;
191 * it's useful to ignore a case when inheritance will catch all the cases anyway.
192 * <!-- end-user-doc -->
193 * @return the new adapter.
194 * @see com.hammurapi.flow.Pin
195 * @generated
196 */
197 public Adapter createPinAdapter() {
198 return null;
199 }
200
201 /**
202 * Creates a new adapter for an object of class '{@link com.hammurapi.flow.Transition <em>Transition</em>}'.
203 * <!-- begin-user-doc -->
204 * This default implementation returns null so that we can easily ignore cases;
205 * it's useful to ignore a case when inheritance will catch all the cases anyway.
206 * <!-- end-user-doc -->
207 * @return the new adapter.
208 * @see com.hammurapi.flow.Transition
209 * @generated
210 */
211 public Adapter createTransitionAdapter() {
212 return null;
213 }
214
215 /**
216 * Creates a new adapter for an object of class '{@link com.hammurapi.party.CommonObject <em>Common Object</em>}'.
217 * <!-- begin-user-doc -->
218 * This default implementation returns null so that we can easily ignore cases;
219 * it's useful to ignore a case when inheritance will catch all the cases anyway.
220 * <!-- end-user-doc -->
221 * @return the new adapter.
222 * @see com.hammurapi.party.CommonObject
223 * @generated
224 */
225 public Adapter createCommonObjectAdapter() {
226 return null;
227 }
228
229 /**
230 * Creates a new adapter for an object of class '{@link com.hammurapi.config.Factory <em>Factory</em>}'.
231 * <!-- begin-user-doc -->
232 * This default implementation returns null so that we can easily ignore cases;
233 * it's useful to ignore a case when inheritance will catch all the cases anyway.
234 * <!-- end-user-doc -->
235 * @return the new adapter.
236 * @see com.hammurapi.config.Factory
237 * @generated
238 */
239 public Adapter createFactoryAdapter() {
240 return null;
241 }
242
243 /**
244 * Creates a new adapter for an object of class '{@link com.hammurapi.config.Named <em>Named</em>}'.
245 * <!-- begin-user-doc -->
246 * This default implementation returns null so that we can easily ignore cases;
247 * it's useful to ignore a case when inheritance will catch all the cases anyway.
248 * <!-- end-user-doc -->
249 * @return the new adapter.
250 * @see com.hammurapi.config.Named
251 * @generated
252 */
253 public Adapter createNamedAdapter() {
254 return null;
255 }
256
257 /**
258 * Creates a new adapter for an object of class '{@link com.hammurapi.config.PropertySource <em>Property Source</em>}'.
259 * <!-- begin-user-doc -->
260 * This default implementation returns null so that we can easily ignore cases;
261 * it's useful to ignore a case when inheritance will catch all the cases anyway.
262 * <!-- end-user-doc -->
263 * @return the new adapter.
264 * @see com.hammurapi.config.PropertySource
265 * @generated
266 */
267 public Adapter createPropertySourceAdapter() {
268 return null;
269 }
270
271 /**
272 * Creates a new adapter for an object of class '{@link com.hammurapi.config.ObjectDefinition <em>Object Definition</em>}'.
273 * <!-- begin-user-doc -->
274 * This default implementation returns null so that we can easily ignore cases;
275 * it's useful to ignore a case when inheritance will catch all the cases anyway.
276 * <!-- end-user-doc -->
277 * @return the new adapter.
278 * @see com.hammurapi.config.ObjectDefinition
279 * @generated
280 */
281 public Adapter createObjectDefinitionAdapter() {
282 return null;
283 }
284
285 /**
286 * Creates a new adapter for an object of class '{@link com.hammurapi.config.NamedObjectDefinition <em>Named Object Definition</em>}'.
287 * <!-- begin-user-doc -->
288 * This default implementation returns null so that we can easily ignore cases;
289 * it's useful to ignore a case when inheritance will catch all the cases anyway.
290 * <!-- end-user-doc -->
291 * @return the new adapter.
292 * @see com.hammurapi.config.NamedObjectDefinition
293 * @generated
294 */
295 public Adapter createNamedObjectDefinitionAdapter() {
296 return null;
297 }
298
299 /**
300 * Creates a new adapter for the default case.
301 * <!-- begin-user-doc -->
302 * This default implementation returns null.
303 * <!-- end-user-doc -->
304 * @return the new adapter.
305 * @generated
306 */
307 public Adapter createEObjectAdapter() {
308 return null;
309 }
310
311 } //FlowAdapterFactory