| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package de.uka.ipd.sdq.spa.expression.util; |
| 8 | |
| 9 | import de.uka.ipd.sdq.spa.expression.*; |
| 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.spa.expression.ExpressionPackage |
| 24 | * @generated |
| 25 | */ |
| 26 | public class ExpressionAdapterFactory extends AdapterFactoryImpl { |
| 27 | /** |
| 28 | * The cached model package. |
| 29 | * <!-- begin-user-doc --> |
| 30 | * <!-- end-user-doc --> |
| 31 | * @generated |
| 32 | */ |
| 33 | protected static ExpressionPackage modelPackage; |
| 34 | |
| 35 | /** |
| 36 | * Creates an instance of the adapter factory. |
| 37 | * <!-- begin-user-doc --> |
| 38 | * <!-- end-user-doc --> |
| 39 | * @generated |
| 40 | */ |
| 41 | public ExpressionAdapterFactory() { |
| 42 | if (modelPackage == null) { |
| 43 | modelPackage = ExpressionPackage.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 the delegates to the <code>createXXX</code> methods. |
| 68 | * <!-- begin-user-doc --> |
| 69 | * <!-- end-user-doc --> |
| 70 | * @generated |
| 71 | */ |
| 72 | protected ExpressionSwitch<Adapter> modelSwitch = |
| 73 | new ExpressionSwitch<Adapter>() { |
| 74 | @Override |
| 75 | public Adapter caseTerminal(Terminal object) { |
| 76 | return createTerminalAdapter(); |
| 77 | } |
| 78 | @Override |
| 79 | public Adapter caseExpression(Expression object) { |
| 80 | return createExpressionAdapter(); |
| 81 | } |
| 82 | @Override |
| 83 | public Adapter caseSymbol(Symbol object) { |
| 84 | return createSymbolAdapter(); |
| 85 | } |
| 86 | @Override |
| 87 | public Adapter caseSequence(Sequence object) { |
| 88 | return createSequenceAdapter(); |
| 89 | } |
| 90 | @Override |
| 91 | public Adapter caseOperation(Operation object) { |
| 92 | return createOperationAdapter(); |
| 93 | } |
| 94 | @Override |
| 95 | public Adapter caseRelease(Release object) { |
| 96 | return createReleaseAdapter(); |
| 97 | } |
| 98 | @Override |
| 99 | public Adapter caseParallel(Parallel object) { |
| 100 | return createParallelAdapter(); |
| 101 | } |
| 102 | @Override |
| 103 | public Adapter caseOption(Option object) { |
| 104 | return createOptionAdapter(); |
| 105 | } |
| 106 | @Override |
| 107 | public Adapter caseLoop(Loop object) { |
| 108 | return createLoopAdapter(); |
| 109 | } |
| 110 | @Override |
| 111 | public Adapter caseAlternative(Alternative object) { |
| 112 | return createAlternativeAdapter(); |
| 113 | } |
| 114 | @Override |
| 115 | public Adapter caseAcquire(Acquire object) { |
| 116 | return createAcquireAdapter(); |
| 117 | } |
| 118 | @Override |
| 119 | public Adapter defaultCase(EObject object) { |
| 120 | return createEObjectAdapter(); |
| 121 | } |
| 122 | }; |
| 123 | |
| 124 | /** |
| 125 | * Creates an adapter for the <code>target</code>. |
| 126 | * <!-- begin-user-doc --> |
| 127 | * <!-- end-user-doc --> |
| 128 | * @param target the object to adapt. |
| 129 | * @return the adapter for the <code>target</code>. |
| 130 | * @generated |
| 131 | */ |
| 132 | @Override |
| 133 | public Adapter createAdapter(Notifier target) { |
| 134 | return modelSwitch.doSwitch((EObject)target); |
| 135 | } |
| 136 | |
| 137 | |
| 138 | /** |
| 139 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.expression.Terminal <em>Terminal</em>}'. |
| 140 | * <!-- begin-user-doc --> |
| 141 | * This default implementation returns null so that we can easily ignore cases; |
| 142 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 143 | * <!-- end-user-doc --> |
| 144 | * @return the new adapter. |
| 145 | * @see de.uka.ipd.sdq.spa.expression.Terminal |
| 146 | * @generated |
| 147 | */ |
| 148 | public Adapter createTerminalAdapter() { |
| 149 | return null; |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.expression.Expression <em>Expression</em>}'. |
| 154 | * <!-- begin-user-doc --> |
| 155 | * This default implementation returns null so that we can easily ignore cases; |
| 156 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 157 | * <!-- end-user-doc --> |
| 158 | * @return the new adapter. |
| 159 | * @see de.uka.ipd.sdq.spa.expression.Expression |
| 160 | * @generated |
| 161 | */ |
| 162 | public Adapter createExpressionAdapter() { |
| 163 | return null; |
| 164 | } |
| 165 | |
| 166 | /** |
| 167 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.expression.Symbol <em>Symbol</em>}'. |
| 168 | * <!-- begin-user-doc --> |
| 169 | * This default implementation returns null so that we can easily ignore cases; |
| 170 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 171 | * <!-- end-user-doc --> |
| 172 | * @return the new adapter. |
| 173 | * @see de.uka.ipd.sdq.spa.expression.Symbol |
| 174 | * @generated |
| 175 | */ |
| 176 | public Adapter createSymbolAdapter() { |
| 177 | return null; |
| 178 | } |
| 179 | |
| 180 | /** |
| 181 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.expression.Sequence <em>Sequence</em>}'. |
| 182 | * <!-- begin-user-doc --> |
| 183 | * This default implementation returns null so that we can easily ignore cases; |
| 184 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 185 | * <!-- end-user-doc --> |
| 186 | * @return the new adapter. |
| 187 | * @see de.uka.ipd.sdq.spa.expression.Sequence |
| 188 | * @generated |
| 189 | */ |
| 190 | public Adapter createSequenceAdapter() { |
| 191 | return null; |
| 192 | } |
| 193 | |
| 194 | /** |
| 195 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.expression.Operation <em>Operation</em>}'. |
| 196 | * <!-- begin-user-doc --> |
| 197 | * This default implementation returns null so that we can easily ignore cases; |
| 198 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 199 | * <!-- end-user-doc --> |
| 200 | * @return the new adapter. |
| 201 | * @see de.uka.ipd.sdq.spa.expression.Operation |
| 202 | * @generated |
| 203 | */ |
| 204 | public Adapter createOperationAdapter() { |
| 205 | return null; |
| 206 | } |
| 207 | |
| 208 | /** |
| 209 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.expression.Release <em>Release</em>}'. |
| 210 | * <!-- begin-user-doc --> |
| 211 | * This default implementation returns null so that we can easily ignore cases; |
| 212 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 213 | * <!-- end-user-doc --> |
| 214 | * @return the new adapter. |
| 215 | * @see de.uka.ipd.sdq.spa.expression.Release |
| 216 | * @generated |
| 217 | */ |
| 218 | public Adapter createReleaseAdapter() { |
| 219 | return null; |
| 220 | } |
| 221 | |
| 222 | /** |
| 223 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.expression.Parallel <em>Parallel</em>}'. |
| 224 | * <!-- begin-user-doc --> |
| 225 | * This default implementation returns null so that we can easily ignore cases; |
| 226 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 227 | * <!-- end-user-doc --> |
| 228 | * @return the new adapter. |
| 229 | * @see de.uka.ipd.sdq.spa.expression.Parallel |
| 230 | * @generated |
| 231 | */ |
| 232 | public Adapter createParallelAdapter() { |
| 233 | return null; |
| 234 | } |
| 235 | |
| 236 | /** |
| 237 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.expression.Option <em>Option</em>}'. |
| 238 | * <!-- begin-user-doc --> |
| 239 | * This default implementation returns null so that we can easily ignore cases; |
| 240 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 241 | * <!-- end-user-doc --> |
| 242 | * @return the new adapter. |
| 243 | * @see de.uka.ipd.sdq.spa.expression.Option |
| 244 | * @generated |
| 245 | */ |
| 246 | public Adapter createOptionAdapter() { |
| 247 | return null; |
| 248 | } |
| 249 | |
| 250 | /** |
| 251 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.expression.Loop <em>Loop</em>}'. |
| 252 | * <!-- begin-user-doc --> |
| 253 | * This default implementation returns null so that we can easily ignore cases; |
| 254 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 255 | * <!-- end-user-doc --> |
| 256 | * @return the new adapter. |
| 257 | * @see de.uka.ipd.sdq.spa.expression.Loop |
| 258 | * @generated |
| 259 | */ |
| 260 | public Adapter createLoopAdapter() { |
| 261 | return null; |
| 262 | } |
| 263 | |
| 264 | /** |
| 265 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.expression.Alternative <em>Alternative</em>}'. |
| 266 | * <!-- begin-user-doc --> |
| 267 | * This default implementation returns null so that we can easily ignore cases; |
| 268 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 269 | * <!-- end-user-doc --> |
| 270 | * @return the new adapter. |
| 271 | * @see de.uka.ipd.sdq.spa.expression.Alternative |
| 272 | * @generated |
| 273 | */ |
| 274 | public Adapter createAlternativeAdapter() { |
| 275 | return null; |
| 276 | } |
| 277 | |
| 278 | /** |
| 279 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.spa.expression.Acquire <em>Acquire</em>}'. |
| 280 | * <!-- begin-user-doc --> |
| 281 | * This default implementation returns null so that we can easily ignore cases; |
| 282 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 283 | * <!-- end-user-doc --> |
| 284 | * @return the new adapter. |
| 285 | * @see de.uka.ipd.sdq.spa.expression.Acquire |
| 286 | * @generated |
| 287 | */ |
| 288 | public Adapter createAcquireAdapter() { |
| 289 | return null; |
| 290 | } |
| 291 | |
| 292 | /** |
| 293 | * Creates a new adapter for the default case. |
| 294 | * <!-- begin-user-doc --> |
| 295 | * This default implementation returns null. |
| 296 | * <!-- end-user-doc --> |
| 297 | * @return the new adapter. |
| 298 | * @generated |
| 299 | */ |
| 300 | public Adapter createEObjectAdapter() { |
| 301 | return null; |
| 302 | } |
| 303 | |
| 304 | } //ExpressionAdapterFactory |