| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package QVTTemplate.util; |
| 8 | |
| 9 | import EMOF.Element; |
| 10 | import EMOF.NamedElement; |
| 11 | import EMOF.TypedElement; |
| 12 | |
| 13 | import EssentialOCL.LiteralExp; |
| 14 | import EssentialOCL.OclExpression; |
| 15 | |
| 16 | import QVTTemplate.*; |
| 17 | |
| 18 | import org.eclipse.emf.common.notify.Adapter; |
| 19 | import org.eclipse.emf.common.notify.Notifier; |
| 20 | |
| 21 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; |
| 22 | |
| 23 | import org.eclipse.emf.ecore.EObject; |
| 24 | |
| 25 | /** |
| 26 | * <!-- begin-user-doc --> |
| 27 | * The <b>Adapter Factory</b> for the model. |
| 28 | * It provides an adapter <code>createXXX</code> method for each class of the model. |
| 29 | * <!-- end-user-doc --> |
| 30 | * @see QVTTemplate.QVTTemplatePackage |
| 31 | * @generated |
| 32 | */ |
| 33 | public class QVTTemplateAdapterFactory extends AdapterFactoryImpl { |
| 34 | /** |
| 35 | * The cached model package. |
| 36 | * <!-- begin-user-doc --> |
| 37 | * <!-- end-user-doc --> |
| 38 | * @generated |
| 39 | */ |
| 40 | protected static QVTTemplatePackage modelPackage; |
| 41 | |
| 42 | /** |
| 43 | * Creates an instance of the adapter factory. |
| 44 | * <!-- begin-user-doc --> |
| 45 | * <!-- end-user-doc --> |
| 46 | * @generated |
| 47 | */ |
| 48 | public QVTTemplateAdapterFactory() { |
| 49 | if (modelPackage == null) { |
| 50 | modelPackage = QVTTemplatePackage.eINSTANCE; |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Returns whether this factory is applicable for the type of the object. |
| 56 | * <!-- begin-user-doc --> |
| 57 | * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. |
| 58 | * <!-- end-user-doc --> |
| 59 | * @return whether this factory is applicable for the type of the object. |
| 60 | * @generated |
| 61 | */ |
| 62 | @Override |
| 63 | public boolean isFactoryForType(Object object) { |
| 64 | if (object == modelPackage) { |
| 65 | return true; |
| 66 | } |
| 67 | if (object instanceof EObject) { |
| 68 | return ((EObject)object).eClass().getEPackage() == modelPackage; |
| 69 | } |
| 70 | return false; |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * The switch that delegates to the <code>createXXX</code> methods. |
| 75 | * <!-- begin-user-doc --> |
| 76 | * <!-- end-user-doc --> |
| 77 | * @generated |
| 78 | */ |
| 79 | protected QVTTemplateSwitch<Adapter> modelSwitch = |
| 80 | new QVTTemplateSwitch<Adapter>() { |
| 81 | @Override |
| 82 | public Adapter caseCollectionTemplateExp(CollectionTemplateExp object) { |
| 83 | return createCollectionTemplateExpAdapter(); |
| 84 | } |
| 85 | @Override |
| 86 | public Adapter caseObjectTemplateExp(ObjectTemplateExp object) { |
| 87 | return createObjectTemplateExpAdapter(); |
| 88 | } |
| 89 | @Override |
| 90 | public Adapter casePropertyTemplateItem(PropertyTemplateItem object) { |
| 91 | return createPropertyTemplateItemAdapter(); |
| 92 | } |
| 93 | @Override |
| 94 | public Adapter caseTemplateExp(TemplateExp object) { |
| 95 | return createTemplateExpAdapter(); |
| 96 | } |
| 97 | @Override |
| 98 | public Adapter caseObject(EMOF.Object object) { |
| 99 | return createObjectAdapter(); |
| 100 | } |
| 101 | @Override |
| 102 | public Adapter caseElement(Element object) { |
| 103 | return createElementAdapter(); |
| 104 | } |
| 105 | @Override |
| 106 | public Adapter caseNamedElement(NamedElement object) { |
| 107 | return createNamedElementAdapter(); |
| 108 | } |
| 109 | @Override |
| 110 | public Adapter caseTypedElement(TypedElement object) { |
| 111 | return createTypedElementAdapter(); |
| 112 | } |
| 113 | @Override |
| 114 | public Adapter caseOclExpression(OclExpression object) { |
| 115 | return createOclExpressionAdapter(); |
| 116 | } |
| 117 | @Override |
| 118 | public Adapter caseLiteralExp(LiteralExp object) { |
| 119 | return createLiteralExpAdapter(); |
| 120 | } |
| 121 | @Override |
| 122 | public Adapter defaultCase(EObject object) { |
| 123 | return createEObjectAdapter(); |
| 124 | } |
| 125 | }; |
| 126 | |
| 127 | /** |
| 128 | * Creates an adapter for the <code>target</code>. |
| 129 | * <!-- begin-user-doc --> |
| 130 | * <!-- end-user-doc --> |
| 131 | * @param target the object to adapt. |
| 132 | * @return the adapter for the <code>target</code>. |
| 133 | * @generated |
| 134 | */ |
| 135 | @Override |
| 136 | public Adapter createAdapter(Notifier target) { |
| 137 | return modelSwitch.doSwitch((EObject)target); |
| 138 | } |
| 139 | |
| 140 | |
| 141 | /** |
| 142 | * Creates a new adapter for an object of class '{@link QVTTemplate.CollectionTemplateExp <em>Collection Template Exp</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 QVTTemplate.CollectionTemplateExp |
| 149 | * @generated |
| 150 | */ |
| 151 | public Adapter createCollectionTemplateExpAdapter() { |
| 152 | return null; |
| 153 | } |
| 154 | |
| 155 | /** |
| 156 | * Creates a new adapter for an object of class '{@link QVTTemplate.ObjectTemplateExp <em>Object Template Exp</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 QVTTemplate.ObjectTemplateExp |
| 163 | * @generated |
| 164 | */ |
| 165 | public Adapter createObjectTemplateExpAdapter() { |
| 166 | return null; |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * Creates a new adapter for an object of class '{@link QVTTemplate.PropertyTemplateItem <em>Property Template Item</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 QVTTemplate.PropertyTemplateItem |
| 177 | * @generated |
| 178 | */ |
| 179 | public Adapter createPropertyTemplateItemAdapter() { |
| 180 | return null; |
| 181 | } |
| 182 | |
| 183 | /** |
| 184 | * Creates a new adapter for an object of class '{@link QVTTemplate.TemplateExp <em>Template Exp</em>}'. |
| 185 | * <!-- begin-user-doc --> |
| 186 | * This default implementation returns null so that we can easily ignore cases; |
| 187 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 188 | * <!-- end-user-doc --> |
| 189 | * @return the new adapter. |
| 190 | * @see QVTTemplate.TemplateExp |
| 191 | * @generated |
| 192 | */ |
| 193 | public Adapter createTemplateExpAdapter() { |
| 194 | return null; |
| 195 | } |
| 196 | |
| 197 | /** |
| 198 | * Creates a new adapter for an object of class '{@link EMOF.Object <em>Object</em>}'. |
| 199 | * <!-- begin-user-doc --> |
| 200 | * This default implementation returns null so that we can easily ignore cases; |
| 201 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 202 | * <!-- end-user-doc --> |
| 203 | * @return the new adapter. |
| 204 | * @see EMOF.Object |
| 205 | * @generated |
| 206 | */ |
| 207 | public Adapter createObjectAdapter() { |
| 208 | return null; |
| 209 | } |
| 210 | |
| 211 | /** |
| 212 | * Creates a new adapter for an object of class '{@link EMOF.Element <em>Element</em>}'. |
| 213 | * <!-- begin-user-doc --> |
| 214 | * This default implementation returns null so that we can easily ignore cases; |
| 215 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 216 | * <!-- end-user-doc --> |
| 217 | * @return the new adapter. |
| 218 | * @see EMOF.Element |
| 219 | * @generated |
| 220 | */ |
| 221 | public Adapter createElementAdapter() { |
| 222 | return null; |
| 223 | } |
| 224 | |
| 225 | /** |
| 226 | * Creates a new adapter for an object of class '{@link EMOF.NamedElement <em>Named Element</em>}'. |
| 227 | * <!-- begin-user-doc --> |
| 228 | * This default implementation returns null so that we can easily ignore cases; |
| 229 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 230 | * <!-- end-user-doc --> |
| 231 | * @return the new adapter. |
| 232 | * @see EMOF.NamedElement |
| 233 | * @generated |
| 234 | */ |
| 235 | public Adapter createNamedElementAdapter() { |
| 236 | return null; |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * Creates a new adapter for an object of class '{@link EMOF.TypedElement <em>Typed Element</em>}'. |
| 241 | * <!-- begin-user-doc --> |
| 242 | * This default implementation returns null so that we can easily ignore cases; |
| 243 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 244 | * <!-- end-user-doc --> |
| 245 | * @return the new adapter. |
| 246 | * @see EMOF.TypedElement |
| 247 | * @generated |
| 248 | */ |
| 249 | public Adapter createTypedElementAdapter() { |
| 250 | return null; |
| 251 | } |
| 252 | |
| 253 | /** |
| 254 | * Creates a new adapter for an object of class '{@link EssentialOCL.OclExpression <em>Ocl Expression</em>}'. |
| 255 | * <!-- begin-user-doc --> |
| 256 | * This default implementation returns null so that we can easily ignore cases; |
| 257 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 258 | * <!-- end-user-doc --> |
| 259 | * @return the new adapter. |
| 260 | * @see EssentialOCL.OclExpression |
| 261 | * @generated |
| 262 | */ |
| 263 | public Adapter createOclExpressionAdapter() { |
| 264 | return null; |
| 265 | } |
| 266 | |
| 267 | /** |
| 268 | * Creates a new adapter for an object of class '{@link EssentialOCL.LiteralExp <em>Literal Exp</em>}'. |
| 269 | * <!-- begin-user-doc --> |
| 270 | * This default implementation returns null so that we can easily ignore cases; |
| 271 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 272 | * <!-- end-user-doc --> |
| 273 | * @return the new adapter. |
| 274 | * @see EssentialOCL.LiteralExp |
| 275 | * @generated |
| 276 | */ |
| 277 | public Adapter createLiteralExpAdapter() { |
| 278 | return null; |
| 279 | } |
| 280 | |
| 281 | /** |
| 282 | * Creates a new adapter for the default case. |
| 283 | * <!-- begin-user-doc --> |
| 284 | * This default implementation returns null. |
| 285 | * <!-- end-user-doc --> |
| 286 | * @return the new adapter. |
| 287 | * @generated |
| 288 | */ |
| 289 | public Adapter createEObjectAdapter() { |
| 290 | return null; |
| 291 | } |
| 292 | |
| 293 | } //QVTTemplateAdapterFactory |