| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package de.uka.ipd.sdq.identifier.util; |
| 8 | |
| 9 | import de.uka.ipd.sdq.identifier.*; |
| 10 | import org.eclipse.emf.common.notify.Adapter; |
| 11 | import org.eclipse.emf.common.notify.Notifier; |
| 12 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; |
| 13 | import org.eclipse.emf.ecore.EObject; |
| 14 | |
| 15 | import de.uka.ipd.sdq.identifier.Identifier; |
| 16 | import de.uka.ipd.sdq.identifier.IdentifierPackage; |
| 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.identifier.IdentifierPackage |
| 24 | * @generated |
| 25 | */ |
| 26 | public class IdentifierAdapterFactory extends AdapterFactoryImpl { |
| 27 | /** |
| 28 | * <!-- begin-user-doc --> |
| 29 | * <!-- end-user-doc --> |
| 30 | * @generated |
| 31 | */ |
| 32 | public static final String copyright = "Copyright 2007-2009, SDQ, IPD, U Karlsruhe"; |
| 33 | /** |
| 34 | * The cached model package. |
| 35 | * <!-- begin-user-doc --> |
| 36 | * <!-- end-user-doc --> |
| 37 | * @generated |
| 38 | */ |
| 39 | protected static IdentifierPackage modelPackage; |
| 40 | |
| 41 | /** |
| 42 | * Creates an instance of the adapter factory. |
| 43 | * <!-- begin-user-doc --> |
| 44 | * <!-- end-user-doc --> |
| 45 | * @generated |
| 46 | */ |
| 47 | public IdentifierAdapterFactory() { |
| 48 | if (modelPackage == null) { |
| 49 | modelPackage = IdentifierPackage.eINSTANCE; |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Returns whether this factory is applicable for the type of the object. |
| 55 | * <!-- begin-user-doc --> |
| 56 | * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. |
| 57 | * <!-- end-user-doc --> |
| 58 | * @return whether this factory is applicable for the type of the object. |
| 59 | * @generated |
| 60 | */ |
| 61 | @Override |
| 62 | public boolean isFactoryForType(Object object) { |
| 63 | if (object == modelPackage) { |
| 64 | return true; |
| 65 | } |
| 66 | if (object instanceof EObject) { |
| 67 | return ((EObject)object).eClass().getEPackage() == modelPackage; |
| 68 | } |
| 69 | return false; |
| 70 | } |
| 71 | |
| 72 | /** |
| 73 | * The switch that delegates to the <code>createXXX</code> methods. |
| 74 | * <!-- begin-user-doc --> |
| 75 | * <!-- end-user-doc --> |
| 76 | * @generated |
| 77 | */ |
| 78 | protected IdentifierSwitch<Adapter> modelSwitch = |
| 79 | new IdentifierSwitch<Adapter>() { |
| 80 | @Override |
| 81 | public Adapter caseIdentifier(Identifier object) { |
| 82 | return createIdentifierAdapter(); |
| 83 | } |
| 84 | @Override |
| 85 | public Adapter defaultCase(EObject object) { |
| 86 | return createEObjectAdapter(); |
| 87 | } |
| 88 | }; |
| 89 | |
| 90 | /** |
| 91 | * Creates an adapter for the <code>target</code>. |
| 92 | * <!-- begin-user-doc --> |
| 93 | * <!-- end-user-doc --> |
| 94 | * @param target the object to adapt. |
| 95 | * @return the adapter for the <code>target</code>. |
| 96 | * @generated |
| 97 | */ |
| 98 | @Override |
| 99 | public Adapter createAdapter(Notifier target) { |
| 100 | return modelSwitch.doSwitch((EObject)target); |
| 101 | } |
| 102 | |
| 103 | |
| 104 | /** |
| 105 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.identifier.Identifier <em>Identifier</em>}'. |
| 106 | * <!-- begin-user-doc --> |
| 107 | * This default implementation returns null so that we can easily ignore cases; |
| 108 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 109 | * <!-- end-user-doc --> |
| 110 | * @return the new adapter. |
| 111 | * @see de.uka.ipd.sdq.identifier.Identifier |
| 112 | * @generated |
| 113 | */ |
| 114 | public Adapter createIdentifierAdapter() { |
| 115 | return null; |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * Creates a new adapter for the default case. |
| 120 | * <!-- begin-user-doc --> |
| 121 | * This default implementation returns null. |
| 122 | * <!-- end-user-doc --> |
| 123 | * @return the new adapter. |
| 124 | * @generated |
| 125 | */ |
| 126 | public Adapter createEObjectAdapter() { |
| 127 | return null; |
| 128 | } |
| 129 | |
| 130 | } //IdentifierAdapterFactory |