1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.uka.ipd.sdq.spa.util; |
8 | |
9 | import de.uka.ipd.sdq.spa.*; |
10 | |
11 | import org.eclipse.emf.common.notify.Adapter; |
12 | import org.eclipse.emf.common.notify.Notifier; |
13 | |
14 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; |
15 | |
16 | import org.eclipse.emf.ecore.EObject; |
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 de.uka.ipd.sdq.spa.SpaPackage |
24 | * @generated |
25 | */ |
26 | public class SpaAdapterFactory extends AdapterFactoryImpl { |
27 | /** |
28 | * The cached model package. |
29 | * <!-- begin-user-doc --> |
30 | * <!-- end-user-doc --> |
31 | * @generated |
32 | */ |
33 | protected static SpaPackage modelPackage; |
34 | |
35 | /** |
36 | * Creates an instance of the adapter factory. |
37 | * <!-- begin-user-doc --> |
38 | * <!-- end-user-doc --> |
39 | * @generated |
40 | */ |
41 | public SpaAdapterFactory() { |
42 | if (modelPackage == null) { |
43 | modelPackage = SpaPackage.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 the delegates to the <code>createXXX</code> methods. |
68 | * <!-- begin-user-doc --> |
69 | * <!-- end-user-doc --> |
70 | * @generated |
71 | */ |
72 | protected SpaSwitch<Adapter> modelSwitch = |
73 | new SpaSwitch<Adapter>() { |
74 | @Override |
75 | public Adapter caseProcessBehaviour(ProcessBehaviour object) { |
76 | return createProcessBehaviourAdapter(); |
77 | } |
78 | @Override |
79 | public Adapter caseSPAModel(SPAModel object) { |
80 | return createSPAModelAdapter(); |
81 | } |
82 | @Override |
83 | public Adapter defaultCase(EObject object) { |
84 | return createEObjectAdapter(); |
85 | } |
86 | }; |
87 | |
88 | /** |
89 | * Creates an adapter for the <code>target</code>. |
90 | * <!-- begin-user-doc --> |
91 | * <!-- end-user-doc --> |
92 | * @param target the object to adapt. |
93 | * @return the adapter for the <code>target</code>. |
94 | * @generated |
95 | */ |
96 | @Override |
97 | public Adapter createAdapter(Notifier target) { |
98 | return modelSwitch.doSwitch((EObject)target); |
99 | } |
100 | |
101 | |
102 | /** |
103 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.ProcessBehaviour <em>Process Behaviour</em>}'. |
104 | * <!-- begin-user-doc --> |
105 | * This default implementation returns null so that we can easily ignore cases; |
106 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
107 | * <!-- end-user-doc --> |
108 | * @return the new adapter. |
109 | * @see de.uka.ipd.sdq.spa.ProcessBehaviour |
110 | * @generated |
111 | */ |
112 | public Adapter createProcessBehaviourAdapter() { |
113 | return null; |
114 | } |
115 | |
116 | /** |
117 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.SPAModel <em>SPA Model</em>}'. |
118 | * <!-- begin-user-doc --> |
119 | * This default implementation returns null so that we can easily ignore cases; |
120 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
121 | * <!-- end-user-doc --> |
122 | * @return the new adapter. |
123 | * @see de.uka.ipd.sdq.spa.SPAModel |
124 | * @generated |
125 | */ |
126 | public Adapter createSPAModelAdapter() { |
127 | return null; |
128 | } |
129 | |
130 | /** |
131 | * Creates a new adapter for the default case. |
132 | * <!-- begin-user-doc --> |
133 | * This default implementation returns null. |
134 | * <!-- end-user-doc --> |
135 | * @return the new adapter. |
136 | * @generated |
137 | */ |
138 | public Adapter createEObjectAdapter() { |
139 | return null; |
140 | } |
141 | |
142 | } //SpaAdapterFactory |