| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package EMOF.util; |
| 8 | |
| 9 | import EMOF.Comment; |
| 10 | import EMOF.DataType; |
| 11 | import EMOF.EMOFPackage; |
| 12 | import EMOF.Element; |
| 13 | import EMOF.Enumeration; |
| 14 | import EMOF.EnumerationLiteral; |
| 15 | import EMOF.Extent; |
| 16 | import EMOF.Factory; |
| 17 | import EMOF.MultiplicityElement; |
| 18 | import EMOF.NamedElement; |
| 19 | import EMOF.Operation; |
| 20 | import EMOF.Parameter; |
| 21 | import EMOF.PrimitiveType; |
| 22 | import EMOF.Property; |
| 23 | import EMOF.ReflectiveCollection; |
| 24 | import EMOF.ReflectiveSequence; |
| 25 | import EMOF.Tag; |
| 26 | import EMOF.Type; |
| 27 | import EMOF.TypedElement; |
| 28 | import EMOF.URIExtent; |
| 29 | |
| 30 | import org.eclipse.emf.common.notify.Adapter; |
| 31 | import org.eclipse.emf.common.notify.Notifier; |
| 32 | |
| 33 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; |
| 34 | |
| 35 | import org.eclipse.emf.ecore.EObject; |
| 36 | |
| 37 | /** |
| 38 | * <!-- begin-user-doc --> |
| 39 | * The <b>Adapter Factory</b> for the model. |
| 40 | * It provides an adapter <code>createXXX</code> method for each class of the model. |
| 41 | * <!-- end-user-doc --> |
| 42 | * @see EMOF.EMOFPackage |
| 43 | * @generated |
| 44 | */ |
| 45 | public class EMOFAdapterFactory extends AdapterFactoryImpl { |
| 46 | /** |
| 47 | * The cached model package. |
| 48 | * <!-- begin-user-doc --> |
| 49 | * <!-- end-user-doc --> |
| 50 | * @generated |
| 51 | */ |
| 52 | protected static EMOFPackage modelPackage; |
| 53 | |
| 54 | /** |
| 55 | * Creates an instance of the adapter factory. |
| 56 | * <!-- begin-user-doc --> |
| 57 | * <!-- end-user-doc --> |
| 58 | * @generated |
| 59 | */ |
| 60 | public EMOFAdapterFactory() { |
| 61 | if (modelPackage == null) { |
| 62 | modelPackage = EMOFPackage.eINSTANCE; |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * Returns whether this factory is applicable for the type of the object. |
| 68 | * <!-- begin-user-doc --> |
| 69 | * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. |
| 70 | * <!-- end-user-doc --> |
| 71 | * @return whether this factory is applicable for the type of the object. |
| 72 | * @generated |
| 73 | */ |
| 74 | @Override |
| 75 | public boolean isFactoryForType(Object object) { |
| 76 | if (object == modelPackage) { |
| 77 | return true; |
| 78 | } |
| 79 | if (object instanceof EObject) { |
| 80 | return ((EObject)object).eClass().getEPackage() == modelPackage; |
| 81 | } |
| 82 | return false; |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * The switch that delegates to the <code>createXXX</code> methods. |
| 87 | * <!-- begin-user-doc --> |
| 88 | * <!-- end-user-doc --> |
| 89 | * @generated |
| 90 | */ |
| 91 | protected EMOFSwitch<Adapter> modelSwitch = |
| 92 | new EMOFSwitch<Adapter>() { |
| 93 | @Override |
| 94 | public Adapter caseClass(EMOF.Class object) { |
| 95 | return createClassAdapter(); |
| 96 | } |
| 97 | @Override |
| 98 | public Adapter caseComment(Comment object) { |
| 99 | return createCommentAdapter(); |
| 100 | } |
| 101 | @Override |
| 102 | public Adapter caseDataType(DataType object) { |
| 103 | return createDataTypeAdapter(); |
| 104 | } |
| 105 | @Override |
| 106 | public Adapter caseElement(Element object) { |
| 107 | return createElementAdapter(); |
| 108 | } |
| 109 | @Override |
| 110 | public Adapter caseEnumeration(Enumeration object) { |
| 111 | return createEnumerationAdapter(); |
| 112 | } |
| 113 | @Override |
| 114 | public Adapter caseEnumerationLiteral(EnumerationLiteral object) { |
| 115 | return createEnumerationLiteralAdapter(); |
| 116 | } |
| 117 | @Override |
| 118 | public Adapter caseExtent(Extent object) { |
| 119 | return createExtentAdapter(); |
| 120 | } |
| 121 | @Override |
| 122 | public Adapter caseFactory(Factory object) { |
| 123 | return createFactoryAdapter(); |
| 124 | } |
| 125 | @Override |
| 126 | public Adapter caseMultiplicityElement(MultiplicityElement object) { |
| 127 | return createMultiplicityElementAdapter(); |
| 128 | } |
| 129 | @Override |
| 130 | public Adapter caseNamedElement(NamedElement object) { |
| 131 | return createNamedElementAdapter(); |
| 132 | } |
| 133 | @Override |
| 134 | public Adapter caseObject(EMOF.Object object) { |
| 135 | return createObjectAdapter(); |
| 136 | } |
| 137 | @Override |
| 138 | public Adapter caseOperation(Operation object) { |
| 139 | return createOperationAdapter(); |
| 140 | } |
| 141 | @Override |
| 142 | public Adapter casePackage(EMOF.Package object) { |
| 143 | return createPackageAdapter(); |
| 144 | } |
| 145 | @Override |
| 146 | public Adapter caseParameter(Parameter object) { |
| 147 | return createParameterAdapter(); |
| 148 | } |
| 149 | @Override |
| 150 | public Adapter casePrimitiveType(PrimitiveType object) { |
| 151 | return createPrimitiveTypeAdapter(); |
| 152 | } |
| 153 | @Override |
| 154 | public Adapter caseProperty(Property object) { |
| 155 | return createPropertyAdapter(); |
| 156 | } |
| 157 | @Override |
| 158 | public Adapter caseReflectiveCollection(ReflectiveCollection object) { |
| 159 | return createReflectiveCollectionAdapter(); |
| 160 | } |
| 161 | @Override |
| 162 | public Adapter caseReflectiveSequence(ReflectiveSequence object) { |
| 163 | return createReflectiveSequenceAdapter(); |
| 164 | } |
| 165 | @Override |
| 166 | public Adapter caseTag(Tag object) { |
| 167 | return createTagAdapter(); |
| 168 | } |
| 169 | @Override |
| 170 | public Adapter caseType(Type object) { |
| 171 | return createTypeAdapter(); |
| 172 | } |
| 173 | @Override |
| 174 | public Adapter caseTypedElement(TypedElement object) { |
| 175 | return createTypedElementAdapter(); |
| 176 | } |
| 177 | @Override |
| 178 | public Adapter caseURIExtent(URIExtent object) { |
| 179 | return createURIExtentAdapter(); |
| 180 | } |
| 181 | @Override |
| 182 | public Adapter defaultCase(EObject object) { |
| 183 | return createEObjectAdapter(); |
| 184 | } |
| 185 | }; |
| 186 | |
| 187 | /** |
| 188 | * Creates an adapter for the <code>target</code>. |
| 189 | * <!-- begin-user-doc --> |
| 190 | * <!-- end-user-doc --> |
| 191 | * @param target the object to adapt. |
| 192 | * @return the adapter for the <code>target</code>. |
| 193 | * @generated |
| 194 | */ |
| 195 | @Override |
| 196 | public Adapter createAdapter(Notifier target) { |
| 197 | return modelSwitch.doSwitch((EObject)target); |
| 198 | } |
| 199 | |
| 200 | |
| 201 | /** |
| 202 | * Creates a new adapter for an object of class '{@link EMOF.Class <em>Class</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 EMOF.Class |
| 209 | * @generated |
| 210 | */ |
| 211 | public Adapter createClassAdapter() { |
| 212 | return null; |
| 213 | } |
| 214 | |
| 215 | /** |
| 216 | * Creates a new adapter for an object of class '{@link EMOF.Comment <em>Comment</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 EMOF.Comment |
| 223 | * @generated |
| 224 | */ |
| 225 | public Adapter createCommentAdapter() { |
| 226 | return null; |
| 227 | } |
| 228 | |
| 229 | /** |
| 230 | * Creates a new adapter for an object of class '{@link EMOF.DataType <em>Data Type</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 EMOF.DataType |
| 237 | * @generated |
| 238 | */ |
| 239 | public Adapter createDataTypeAdapter() { |
| 240 | return null; |
| 241 | } |
| 242 | |
| 243 | /** |
| 244 | * Creates a new adapter for an object of class '{@link EMOF.Element <em>Element</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 EMOF.Element |
| 251 | * @generated |
| 252 | */ |
| 253 | public Adapter createElementAdapter() { |
| 254 | return null; |
| 255 | } |
| 256 | |
| 257 | /** |
| 258 | * Creates a new adapter for an object of class '{@link EMOF.Enumeration <em>Enumeration</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 EMOF.Enumeration |
| 265 | * @generated |
| 266 | */ |
| 267 | public Adapter createEnumerationAdapter() { |
| 268 | return null; |
| 269 | } |
| 270 | |
| 271 | /** |
| 272 | * Creates a new adapter for an object of class '{@link EMOF.EnumerationLiteral <em>Enumeration Literal</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 EMOF.EnumerationLiteral |
| 279 | * @generated |
| 280 | */ |
| 281 | public Adapter createEnumerationLiteralAdapter() { |
| 282 | return null; |
| 283 | } |
| 284 | |
| 285 | /** |
| 286 | * Creates a new adapter for an object of class '{@link EMOF.Extent <em>Extent</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 EMOF.Extent |
| 293 | * @generated |
| 294 | */ |
| 295 | public Adapter createExtentAdapter() { |
| 296 | return null; |
| 297 | } |
| 298 | |
| 299 | /** |
| 300 | * Creates a new adapter for an object of class '{@link EMOF.Factory <em>Factory</em>}'. |
| 301 | * <!-- begin-user-doc --> |
| 302 | * This default implementation returns null so that we can easily ignore cases; |
| 303 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 304 | * <!-- end-user-doc --> |
| 305 | * @return the new adapter. |
| 306 | * @see EMOF.Factory |
| 307 | * @generated |
| 308 | */ |
| 309 | public Adapter createFactoryAdapter() { |
| 310 | return null; |
| 311 | } |
| 312 | |
| 313 | /** |
| 314 | * Creates a new adapter for an object of class '{@link EMOF.MultiplicityElement <em>Multiplicity Element</em>}'. |
| 315 | * <!-- begin-user-doc --> |
| 316 | * This default implementation returns null so that we can easily ignore cases; |
| 317 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 318 | * <!-- end-user-doc --> |
| 319 | * @return the new adapter. |
| 320 | * @see EMOF.MultiplicityElement |
| 321 | * @generated |
| 322 | */ |
| 323 | public Adapter createMultiplicityElementAdapter() { |
| 324 | return null; |
| 325 | } |
| 326 | |
| 327 | /** |
| 328 | * Creates a new adapter for an object of class '{@link EMOF.NamedElement <em>Named Element</em>}'. |
| 329 | * <!-- begin-user-doc --> |
| 330 | * This default implementation returns null so that we can easily ignore cases; |
| 331 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 332 | * <!-- end-user-doc --> |
| 333 | * @return the new adapter. |
| 334 | * @see EMOF.NamedElement |
| 335 | * @generated |
| 336 | */ |
| 337 | public Adapter createNamedElementAdapter() { |
| 338 | return null; |
| 339 | } |
| 340 | |
| 341 | /** |
| 342 | * Creates a new adapter for an object of class '{@link EMOF.Object <em>Object</em>}'. |
| 343 | * <!-- begin-user-doc --> |
| 344 | * This default implementation returns null so that we can easily ignore cases; |
| 345 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 346 | * <!-- end-user-doc --> |
| 347 | * @return the new adapter. |
| 348 | * @see EMOF.Object |
| 349 | * @generated |
| 350 | */ |
| 351 | public Adapter createObjectAdapter() { |
| 352 | return null; |
| 353 | } |
| 354 | |
| 355 | /** |
| 356 | * Creates a new adapter for an object of class '{@link EMOF.Operation <em>Operation</em>}'. |
| 357 | * <!-- begin-user-doc --> |
| 358 | * This default implementation returns null so that we can easily ignore cases; |
| 359 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 360 | * <!-- end-user-doc --> |
| 361 | * @return the new adapter. |
| 362 | * @see EMOF.Operation |
| 363 | * @generated |
| 364 | */ |
| 365 | public Adapter createOperationAdapter() { |
| 366 | return null; |
| 367 | } |
| 368 | |
| 369 | /** |
| 370 | * Creates a new adapter for an object of class '{@link EMOF.Package <em>Package</em>}'. |
| 371 | * <!-- begin-user-doc --> |
| 372 | * This default implementation returns null so that we can easily ignore cases; |
| 373 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 374 | * <!-- end-user-doc --> |
| 375 | * @return the new adapter. |
| 376 | * @see EMOF.Package |
| 377 | * @generated |
| 378 | */ |
| 379 | public Adapter createPackageAdapter() { |
| 380 | return null; |
| 381 | } |
| 382 | |
| 383 | /** |
| 384 | * Creates a new adapter for an object of class '{@link EMOF.Parameter <em>Parameter</em>}'. |
| 385 | * <!-- begin-user-doc --> |
| 386 | * This default implementation returns null so that we can easily ignore cases; |
| 387 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 388 | * <!-- end-user-doc --> |
| 389 | * @return the new adapter. |
| 390 | * @see EMOF.Parameter |
| 391 | * @generated |
| 392 | */ |
| 393 | public Adapter createParameterAdapter() { |
| 394 | return null; |
| 395 | } |
| 396 | |
| 397 | /** |
| 398 | * Creates a new adapter for an object of class '{@link EMOF.PrimitiveType <em>Primitive Type</em>}'. |
| 399 | * <!-- begin-user-doc --> |
| 400 | * This default implementation returns null so that we can easily ignore cases; |
| 401 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 402 | * <!-- end-user-doc --> |
| 403 | * @return the new adapter. |
| 404 | * @see EMOF.PrimitiveType |
| 405 | * @generated |
| 406 | */ |
| 407 | public Adapter createPrimitiveTypeAdapter() { |
| 408 | return null; |
| 409 | } |
| 410 | |
| 411 | /** |
| 412 | * Creates a new adapter for an object of class '{@link EMOF.Property <em>Property</em>}'. |
| 413 | * <!-- begin-user-doc --> |
| 414 | * This default implementation returns null so that we can easily ignore cases; |
| 415 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 416 | * <!-- end-user-doc --> |
| 417 | * @return the new adapter. |
| 418 | * @see EMOF.Property |
| 419 | * @generated |
| 420 | */ |
| 421 | public Adapter createPropertyAdapter() { |
| 422 | return null; |
| 423 | } |
| 424 | |
| 425 | /** |
| 426 | * Creates a new adapter for an object of class '{@link EMOF.ReflectiveCollection <em>Reflective Collection</em>}'. |
| 427 | * <!-- begin-user-doc --> |
| 428 | * This default implementation returns null so that we can easily ignore cases; |
| 429 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 430 | * <!-- end-user-doc --> |
| 431 | * @return the new adapter. |
| 432 | * @see EMOF.ReflectiveCollection |
| 433 | * @generated |
| 434 | */ |
| 435 | public Adapter createReflectiveCollectionAdapter() { |
| 436 | return null; |
| 437 | } |
| 438 | |
| 439 | /** |
| 440 | * Creates a new adapter for an object of class '{@link EMOF.ReflectiveSequence <em>Reflective Sequence</em>}'. |
| 441 | * <!-- begin-user-doc --> |
| 442 | * This default implementation returns null so that we can easily ignore cases; |
| 443 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 444 | * <!-- end-user-doc --> |
| 445 | * @return the new adapter. |
| 446 | * @see EMOF.ReflectiveSequence |
| 447 | * @generated |
| 448 | */ |
| 449 | public Adapter createReflectiveSequenceAdapter() { |
| 450 | return null; |
| 451 | } |
| 452 | |
| 453 | /** |
| 454 | * Creates a new adapter for an object of class '{@link EMOF.Tag <em>Tag</em>}'. |
| 455 | * <!-- begin-user-doc --> |
| 456 | * This default implementation returns null so that we can easily ignore cases; |
| 457 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 458 | * <!-- end-user-doc --> |
| 459 | * @return the new adapter. |
| 460 | * @see EMOF.Tag |
| 461 | * @generated |
| 462 | */ |
| 463 | public Adapter createTagAdapter() { |
| 464 | return null; |
| 465 | } |
| 466 | |
| 467 | /** |
| 468 | * Creates a new adapter for an object of class '{@link EMOF.Type <em>Type</em>}'. |
| 469 | * <!-- begin-user-doc --> |
| 470 | * This default implementation returns null so that we can easily ignore cases; |
| 471 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 472 | * <!-- end-user-doc --> |
| 473 | * @return the new adapter. |
| 474 | * @see EMOF.Type |
| 475 | * @generated |
| 476 | */ |
| 477 | public Adapter createTypeAdapter() { |
| 478 | return null; |
| 479 | } |
| 480 | |
| 481 | /** |
| 482 | * Creates a new adapter for an object of class '{@link EMOF.TypedElement <em>Typed Element</em>}'. |
| 483 | * <!-- begin-user-doc --> |
| 484 | * This default implementation returns null so that we can easily ignore cases; |
| 485 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 486 | * <!-- end-user-doc --> |
| 487 | * @return the new adapter. |
| 488 | * @see EMOF.TypedElement |
| 489 | * @generated |
| 490 | */ |
| 491 | public Adapter createTypedElementAdapter() { |
| 492 | return null; |
| 493 | } |
| 494 | |
| 495 | /** |
| 496 | * Creates a new adapter for an object of class '{@link EMOF.URIExtent <em>URI Extent</em>}'. |
| 497 | * <!-- begin-user-doc --> |
| 498 | * This default implementation returns null so that we can easily ignore cases; |
| 499 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 500 | * <!-- end-user-doc --> |
| 501 | * @return the new adapter. |
| 502 | * @see EMOF.URIExtent |
| 503 | * @generated |
| 504 | */ |
| 505 | public Adapter createURIExtentAdapter() { |
| 506 | return null; |
| 507 | } |
| 508 | |
| 509 | /** |
| 510 | * Creates a new adapter for the default case. |
| 511 | * <!-- begin-user-doc --> |
| 512 | * This default implementation returns null. |
| 513 | * <!-- end-user-doc --> |
| 514 | * @return the new adapter. |
| 515 | * @generated |
| 516 | */ |
| 517 | public Adapter createEObjectAdapter() { |
| 518 | return null; |
| 519 | } |
| 520 | |
| 521 | } //EMOFAdapterFactory |