1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.fzi.se.quality.util; |
8 | |
9 | import de.fzi.se.quality.*; |
10 | |
11 | import de.uka.ipd.sdq.identifier.Identifier; |
12 | |
13 | import org.eclipse.emf.common.notify.Adapter; |
14 | import org.eclipse.emf.common.notify.Notifier; |
15 | |
16 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; |
17 | |
18 | import org.eclipse.emf.ecore.EObject; |
19 | |
20 | /** |
21 | * <!-- begin-user-doc --> |
22 | * The <b>Adapter Factory</b> for the model. |
23 | * It provides an adapter <code>createXXX</code> method for each class of the model. |
24 | * <!-- end-user-doc --> |
25 | * @see de.fzi.se.quality.QualityPackage |
26 | * @generated |
27 | */ |
28 | public class QualityAdapterFactory extends AdapterFactoryImpl { |
29 | /** |
30 | * The cached model package. |
31 | * <!-- begin-user-doc --> |
32 | * <!-- end-user-doc --> |
33 | * @generated |
34 | */ |
35 | protected static QualityPackage modelPackage; |
36 | |
37 | /** |
38 | * Creates an instance of the adapter factory. |
39 | * <!-- begin-user-doc --> |
40 | * <!-- end-user-doc --> |
41 | * @generated |
42 | */ |
43 | public QualityAdapterFactory() { |
44 | if (modelPackage == null) { |
45 | modelPackage = QualityPackage.eINSTANCE; |
46 | } |
47 | } |
48 | |
49 | /** |
50 | * Returns whether this factory is applicable for the type of the object. |
51 | * <!-- begin-user-doc --> |
52 | * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. |
53 | * <!-- end-user-doc --> |
54 | * @return whether this factory is applicable for the type of the object. |
55 | * @generated |
56 | */ |
57 | @Override |
58 | public boolean isFactoryForType(Object object) { |
59 | if (object == modelPackage) { |
60 | return true; |
61 | } |
62 | if (object instanceof EObject) { |
63 | return ((EObject)object).eClass().getEPackage() == modelPackage; |
64 | } |
65 | return false; |
66 | } |
67 | |
68 | /** |
69 | * The switch that delegates to the <code>createXXX</code> methods. |
70 | * <!-- begin-user-doc --> |
71 | * <!-- end-user-doc --> |
72 | * @generated |
73 | */ |
74 | protected QualitySwitch<Adapter> modelSwitch = |
75 | new QualitySwitch<Adapter>() { |
76 | @Override |
77 | public Adapter caseQualityRepository(QualityRepository object) { |
78 | return createQualityRepositoryAdapter(); |
79 | } |
80 | @Override |
81 | public Adapter caseQualityStatement(QualityStatement object) { |
82 | return createQualityStatementAdapter(); |
83 | } |
84 | @Override |
85 | public Adapter caseIdentifier(Identifier object) { |
86 | return createIdentifierAdapter(); |
87 | } |
88 | @Override |
89 | public Adapter defaultCase(EObject object) { |
90 | return createEObjectAdapter(); |
91 | } |
92 | }; |
93 | |
94 | /** |
95 | * Creates an adapter for the <code>target</code>. |
96 | * <!-- begin-user-doc --> |
97 | * <!-- end-user-doc --> |
98 | * @param target the object to adapt. |
99 | * @return the adapter for the <code>target</code>. |
100 | * @generated |
101 | */ |
102 | @Override |
103 | public Adapter createAdapter(Notifier target) { |
104 | return modelSwitch.doSwitch((EObject)target); |
105 | } |
106 | |
107 | |
108 | /** |
109 | * Creates a new adapter for an object of class '{@link de.fzi.se.quality.QualityRepository <em>Repository</em>}'. |
110 | * <!-- begin-user-doc --> |
111 | * This default implementation returns null so that we can easily ignore cases; |
112 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
113 | * <!-- end-user-doc --> |
114 | * @return the new adapter. |
115 | * @see de.fzi.se.quality.QualityRepository |
116 | * @generated |
117 | */ |
118 | public Adapter createQualityRepositoryAdapter() { |
119 | return null; |
120 | } |
121 | |
122 | /** |
123 | * Creates a new adapter for an object of class '{@link de.fzi.se.quality.QualityStatement <em>Statement</em>}'. |
124 | * <!-- begin-user-doc --> |
125 | * This default implementation returns null so that we can easily ignore cases; |
126 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
127 | * <!-- end-user-doc --> |
128 | * @return the new adapter. |
129 | * @see de.fzi.se.quality.QualityStatement |
130 | * @generated |
131 | */ |
132 | public Adapter createQualityStatementAdapter() { |
133 | return null; |
134 | } |
135 | |
136 | /** |
137 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.identifier.Identifier <em>Identifier</em>}'. |
138 | * <!-- begin-user-doc --> |
139 | * This default implementation returns null so that we can easily ignore cases; |
140 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
141 | * <!-- end-user-doc --> |
142 | * @return the new adapter. |
143 | * @see de.uka.ipd.sdq.identifier.Identifier |
144 | * @generated |
145 | */ |
146 | public Adapter createIdentifierAdapter() { |
147 | return null; |
148 | } |
149 | |
150 | /** |
151 | * Creates a new adapter for the default case. |
152 | * <!-- begin-user-doc --> |
153 | * This default implementation returns null. |
154 | * <!-- end-user-doc --> |
155 | * @return the new adapter. |
156 | * @generated |
157 | */ |
158 | public Adapter createEObjectAdapter() { |
159 | return null; |
160 | } |
161 | |
162 | } //QualityAdapterFactory |