| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package de.uka.ipd.sdq.markov.util; |
| 8 | |
| 9 | import de.uka.ipd.sdq.markov.*; |
| 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.markov.MarkovPackage |
| 24 | * @generated |
| 25 | */ |
| 26 | public class MarkovAdapterFactory extends AdapterFactoryImpl { |
| 27 | /** |
| 28 | * The cached model package. |
| 29 | * <!-- begin-user-doc --> |
| 30 | * <!-- end-user-doc --> |
| 31 | * @generated |
| 32 | */ |
| 33 | protected static MarkovPackage modelPackage; |
| 34 | |
| 35 | /** |
| 36 | * Creates an instance of the adapter factory. |
| 37 | * <!-- begin-user-doc --> |
| 38 | * <!-- end-user-doc --> |
| 39 | * @generated |
| 40 | */ |
| 41 | public MarkovAdapterFactory() { |
| 42 | if (modelPackage == null) { |
| 43 | modelPackage = MarkovPackage.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 that delegates to the <code>createXXX</code> methods. |
| 68 | * <!-- begin-user-doc --> |
| 69 | * <!-- end-user-doc --> |
| 70 | * @generated |
| 71 | */ |
| 72 | protected MarkovSwitch<Adapter> modelSwitch = |
| 73 | new MarkovSwitch<Adapter>() { |
| 74 | @Override |
| 75 | public Adapter caseState(State object) { |
| 76 | return createStateAdapter(); |
| 77 | } |
| 78 | @Override |
| 79 | public Adapter caseTransition(Transition object) { |
| 80 | return createTransitionAdapter(); |
| 81 | } |
| 82 | @Override |
| 83 | public Adapter caseMarkovChain(MarkovChain object) { |
| 84 | return createMarkovChainAdapter(); |
| 85 | } |
| 86 | @Override |
| 87 | public Adapter caseEntity(Entity object) { |
| 88 | return createEntityAdapter(); |
| 89 | } |
| 90 | @Override |
| 91 | public Adapter caseLabel(Label object) { |
| 92 | return createLabelAdapter(); |
| 93 | } |
| 94 | @Override |
| 95 | public Adapter defaultCase(EObject object) { |
| 96 | return createEObjectAdapter(); |
| 97 | } |
| 98 | }; |
| 99 | |
| 100 | /** |
| 101 | * Creates an adapter for the <code>target</code>. |
| 102 | * <!-- begin-user-doc --> |
| 103 | * <!-- end-user-doc --> |
| 104 | * @param target the object to adapt. |
| 105 | * @return the adapter for the <code>target</code>. |
| 106 | * @generated |
| 107 | */ |
| 108 | @Override |
| 109 | public Adapter createAdapter(Notifier target) { |
| 110 | return modelSwitch.doSwitch((EObject)target); |
| 111 | } |
| 112 | |
| 113 | |
| 114 | /** |
| 115 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.markov.State <em>State</em>}'. |
| 116 | * <!-- begin-user-doc --> |
| 117 | * This default implementation returns null so that we can easily ignore cases; |
| 118 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 119 | * <!-- end-user-doc --> |
| 120 | * @return the new adapter. |
| 121 | * @see de.uka.ipd.sdq.markov.State |
| 122 | * @generated |
| 123 | */ |
| 124 | public Adapter createStateAdapter() { |
| 125 | return null; |
| 126 | } |
| 127 | |
| 128 | /** |
| 129 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.markov.Transition <em>Transition</em>}'. |
| 130 | * <!-- begin-user-doc --> |
| 131 | * This default implementation returns null so that we can easily ignore cases; |
| 132 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 133 | * <!-- end-user-doc --> |
| 134 | * @return the new adapter. |
| 135 | * @see de.uka.ipd.sdq.markov.Transition |
| 136 | * @generated |
| 137 | */ |
| 138 | public Adapter createTransitionAdapter() { |
| 139 | return null; |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.markov.MarkovChain <em>Chain</em>}'. |
| 144 | * <!-- begin-user-doc --> |
| 145 | * This default implementation returns null so that we can easily ignore cases; |
| 146 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 147 | * <!-- end-user-doc --> |
| 148 | * @return the new adapter. |
| 149 | * @see de.uka.ipd.sdq.markov.MarkovChain |
| 150 | * @generated |
| 151 | */ |
| 152 | public Adapter createMarkovChainAdapter() { |
| 153 | return null; |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.markov.Entity <em>Entity</em>}'. |
| 158 | * <!-- begin-user-doc --> |
| 159 | * This default implementation returns null so that we can easily ignore cases; |
| 160 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 161 | * <!-- end-user-doc --> |
| 162 | * @return the new adapter. |
| 163 | * @see de.uka.ipd.sdq.markov.Entity |
| 164 | * @generated |
| 165 | */ |
| 166 | public Adapter createEntityAdapter() { |
| 167 | return null; |
| 168 | } |
| 169 | |
| 170 | /** |
| 171 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.markov.Label <em>Label</em>}'. |
| 172 | * <!-- begin-user-doc --> |
| 173 | * This default implementation returns null so that we can easily ignore cases; |
| 174 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 175 | * <!-- end-user-doc --> |
| 176 | * @return the new adapter. |
| 177 | * @see de.uka.ipd.sdq.markov.Label |
| 178 | * @generated |
| 179 | */ |
| 180 | public Adapter createLabelAdapter() { |
| 181 | return null; |
| 182 | } |
| 183 | |
| 184 | /** |
| 185 | * Creates a new adapter for the default case. |
| 186 | * <!-- begin-user-doc --> |
| 187 | * This default implementation returns null. |
| 188 | * <!-- end-user-doc --> |
| 189 | * @return the new adapter. |
| 190 | * @generated |
| 191 | */ |
| 192 | public Adapter createEObjectAdapter() { |
| 193 | return null; |
| 194 | } |
| 195 | |
| 196 | } //MarkovAdapterFactory |