| 1 | /** |
| 2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
| 3 | * |
| 4 | * $Id$ |
| 5 | */ |
| 6 | package de.uka.ipd.sdq.pcm.parameter.util; |
| 7 | |
| 8 | import de.uka.ipd.sdq.pcm.parameter.*; |
| 9 | import org.eclipse.emf.common.notify.Adapter; |
| 10 | import org.eclipse.emf.common.notify.Notifier; |
| 11 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; |
| 12 | import org.eclipse.emf.ecore.EObject; |
| 13 | |
| 14 | import de.uka.ipd.sdq.pcm.parameter.CharacterisedVariable; |
| 15 | import de.uka.ipd.sdq.pcm.parameter.ParameterPackage; |
| 16 | import de.uka.ipd.sdq.pcm.parameter.VariableCharacterisation; |
| 17 | import de.uka.ipd.sdq.pcm.parameter.VariableUsage; |
| 18 | import de.uka.ipd.sdq.stoex.Atom; |
| 19 | import de.uka.ipd.sdq.stoex.BooleanExpression; |
| 20 | import de.uka.ipd.sdq.stoex.Comparison; |
| 21 | import de.uka.ipd.sdq.stoex.Expression; |
| 22 | import de.uka.ipd.sdq.stoex.IfElse; |
| 23 | import de.uka.ipd.sdq.stoex.Power; |
| 24 | import de.uka.ipd.sdq.stoex.Product; |
| 25 | import de.uka.ipd.sdq.stoex.Term; |
| 26 | import de.uka.ipd.sdq.stoex.Unary; |
| 27 | import de.uka.ipd.sdq.stoex.Variable; |
| 28 | |
| 29 | /** |
| 30 | * <!-- begin-user-doc --> |
| 31 | * The <b>Adapter Factory</b> for the model. |
| 32 | * It provides an adapter <code>createXXX</code> method for each class of the model. |
| 33 | * <!-- end-user-doc --> |
| 34 | * @see de.uka.ipd.sdq.pcm.parameter.ParameterPackage |
| 35 | * @generated |
| 36 | */ |
| 37 | public class ParameterAdapterFactory extends AdapterFactoryImpl { |
| 38 | /** |
| 39 | * <!-- begin-user-doc --> |
| 40 | * <!-- end-user-doc --> |
| 41 | * @generated |
| 42 | */ |
| 43 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
| 44 | |
| 45 | /** |
| 46 | * The cached model package. |
| 47 | * <!-- begin-user-doc --> |
| 48 | * <!-- end-user-doc --> |
| 49 | * @generated |
| 50 | */ |
| 51 | protected static ParameterPackage modelPackage; |
| 52 | |
| 53 | /** |
| 54 | * Creates an instance of the adapter factory. |
| 55 | * <!-- begin-user-doc --> |
| 56 | * <!-- end-user-doc --> |
| 57 | * @generated |
| 58 | */ |
| 59 | public ParameterAdapterFactory() { |
| 60 | if (modelPackage == null) { |
| 61 | modelPackage = ParameterPackage.eINSTANCE; |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * Returns whether this factory is applicable for the type of the object. |
| 67 | * <!-- begin-user-doc --> |
| 68 | * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. |
| 69 | * <!-- end-user-doc --> |
| 70 | * @return whether this factory is applicable for the type of the object. |
| 71 | * @generated |
| 72 | */ |
| 73 | @Override |
| 74 | public boolean isFactoryForType(Object object) { |
| 75 | if (object == modelPackage) { |
| 76 | return true; |
| 77 | } |
| 78 | if (object instanceof EObject) { |
| 79 | return ((EObject)object).eClass().getEPackage() == modelPackage; |
| 80 | } |
| 81 | return false; |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * The switch that delegates to the <code>createXXX</code> methods. |
| 86 | * <!-- begin-user-doc --> |
| 87 | * <!-- end-user-doc --> |
| 88 | * @generated |
| 89 | */ |
| 90 | protected ParameterSwitch<Adapter> modelSwitch = |
| 91 | new ParameterSwitch<Adapter>() { |
| 92 | @Override |
| 93 | public Adapter caseVariableUsage(VariableUsage object) { |
| 94 | return createVariableUsageAdapter(); |
| 95 | } |
| 96 | @Override |
| 97 | public Adapter caseVariableCharacterisation(VariableCharacterisation object) { |
| 98 | return createVariableCharacterisationAdapter(); |
| 99 | } |
| 100 | @Override |
| 101 | public Adapter caseCharacterisedVariable(CharacterisedVariable object) { |
| 102 | return createCharacterisedVariableAdapter(); |
| 103 | } |
| 104 | @Override |
| 105 | public Adapter caseExpression(Expression object) { |
| 106 | return createExpressionAdapter(); |
| 107 | } |
| 108 | @Override |
| 109 | public Adapter caseIfElse(IfElse object) { |
| 110 | return createIfElseAdapter(); |
| 111 | } |
| 112 | @Override |
| 113 | public Adapter caseBooleanExpression(BooleanExpression object) { |
| 114 | return createBooleanExpressionAdapter(); |
| 115 | } |
| 116 | @Override |
| 117 | public Adapter caseComparison(Comparison object) { |
| 118 | return createComparisonAdapter(); |
| 119 | } |
| 120 | @Override |
| 121 | public Adapter caseTerm(Term object) { |
| 122 | return createTermAdapter(); |
| 123 | } |
| 124 | @Override |
| 125 | public Adapter caseProduct(Product object) { |
| 126 | return createProductAdapter(); |
| 127 | } |
| 128 | @Override |
| 129 | public Adapter casePower(Power object) { |
| 130 | return createPowerAdapter(); |
| 131 | } |
| 132 | @Override |
| 133 | public Adapter caseUnary(Unary object) { |
| 134 | return createUnaryAdapter(); |
| 135 | } |
| 136 | @Override |
| 137 | public Adapter caseAtom(Atom object) { |
| 138 | return createAtomAdapter(); |
| 139 | } |
| 140 | @Override |
| 141 | public Adapter caseVariable(Variable object) { |
| 142 | return createVariableAdapter(); |
| 143 | } |
| 144 | @Override |
| 145 | public Adapter defaultCase(EObject object) { |
| 146 | return createEObjectAdapter(); |
| 147 | } |
| 148 | }; |
| 149 | |
| 150 | /** |
| 151 | * Creates an adapter for the <code>target</code>. |
| 152 | * <!-- begin-user-doc --> |
| 153 | * <!-- end-user-doc --> |
| 154 | * @param target the object to adapt. |
| 155 | * @return the adapter for the <code>target</code>. |
| 156 | * @generated |
| 157 | */ |
| 158 | @Override |
| 159 | public Adapter createAdapter(Notifier target) { |
| 160 | return modelSwitch.doSwitch((EObject)target); |
| 161 | } |
| 162 | |
| 163 | |
| 164 | /** |
| 165 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.pcm.parameter.VariableCharacterisation <em>Variable Characterisation</em>}'. |
| 166 | * <!-- begin-user-doc --> |
| 167 | * This default implementation returns null so that we can easily ignore cases; |
| 168 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 169 | * <!-- end-user-doc --> |
| 170 | * @return the new adapter. |
| 171 | * @see de.uka.ipd.sdq.pcm.parameter.VariableCharacterisation |
| 172 | * @generated |
| 173 | */ |
| 174 | public Adapter createVariableCharacterisationAdapter() { |
| 175 | return null; |
| 176 | } |
| 177 | |
| 178 | /** |
| 179 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.pcm.parameter.CharacterisedVariable <em>Characterised Variable</em>}'. |
| 180 | * <!-- begin-user-doc --> |
| 181 | * This default implementation returns null so that we can easily ignore cases; |
| 182 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 183 | * <!-- end-user-doc --> |
| 184 | * @return the new adapter. |
| 185 | * @see de.uka.ipd.sdq.pcm.parameter.CharacterisedVariable |
| 186 | * @generated |
| 187 | */ |
| 188 | public Adapter createCharacterisedVariableAdapter() { |
| 189 | return null; |
| 190 | } |
| 191 | |
| 192 | /** |
| 193 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.pcm.parameter.VariableUsage <em>Variable Usage</em>}'. |
| 194 | * <!-- begin-user-doc --> |
| 195 | * This default implementation returns null so that we can easily ignore cases; |
| 196 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 197 | * <!-- end-user-doc --> |
| 198 | * @return the new adapter. |
| 199 | * @see de.uka.ipd.sdq.pcm.parameter.VariableUsage |
| 200 | * @generated |
| 201 | */ |
| 202 | public Adapter createVariableUsageAdapter() { |
| 203 | return null; |
| 204 | } |
| 205 | |
| 206 | /** |
| 207 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.stoex.Expression <em>Expression</em>}'. |
| 208 | * <!-- begin-user-doc --> |
| 209 | * This default implementation returns null so that we can easily ignore cases; |
| 210 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 211 | * <!-- end-user-doc --> |
| 212 | * @return the new adapter. |
| 213 | * @see de.uka.ipd.sdq.stoex.Expression |
| 214 | * @generated |
| 215 | */ |
| 216 | public Adapter createExpressionAdapter() { |
| 217 | return null; |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.stoex.IfElse <em>If Else</em>}'. |
| 222 | * <!-- begin-user-doc --> |
| 223 | * This default implementation returns null so that we can easily ignore cases; |
| 224 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 225 | * <!-- end-user-doc --> |
| 226 | * @return the new adapter. |
| 227 | * @see de.uka.ipd.sdq.stoex.IfElse |
| 228 | * @generated |
| 229 | */ |
| 230 | public Adapter createIfElseAdapter() { |
| 231 | return null; |
| 232 | } |
| 233 | |
| 234 | /** |
| 235 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.stoex.BooleanExpression <em>Boolean Expression</em>}'. |
| 236 | * <!-- begin-user-doc --> |
| 237 | * This default implementation returns null so that we can easily ignore cases; |
| 238 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 239 | * <!-- end-user-doc --> |
| 240 | * @return the new adapter. |
| 241 | * @see de.uka.ipd.sdq.stoex.BooleanExpression |
| 242 | * @generated |
| 243 | */ |
| 244 | public Adapter createBooleanExpressionAdapter() { |
| 245 | return null; |
| 246 | } |
| 247 | |
| 248 | /** |
| 249 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.stoex.Comparison <em>Comparison</em>}'. |
| 250 | * <!-- begin-user-doc --> |
| 251 | * This default implementation returns null so that we can easily ignore cases; |
| 252 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 253 | * <!-- end-user-doc --> |
| 254 | * @return the new adapter. |
| 255 | * @see de.uka.ipd.sdq.stoex.Comparison |
| 256 | * @generated |
| 257 | */ |
| 258 | public Adapter createComparisonAdapter() { |
| 259 | return null; |
| 260 | } |
| 261 | |
| 262 | /** |
| 263 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.stoex.Term <em>Term</em>}'. |
| 264 | * <!-- begin-user-doc --> |
| 265 | * This default implementation returns null so that we can easily ignore cases; |
| 266 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 267 | * <!-- end-user-doc --> |
| 268 | * @return the new adapter. |
| 269 | * @see de.uka.ipd.sdq.stoex.Term |
| 270 | * @generated |
| 271 | */ |
| 272 | public Adapter createTermAdapter() { |
| 273 | return null; |
| 274 | } |
| 275 | |
| 276 | /** |
| 277 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.stoex.Product <em>Product</em>}'. |
| 278 | * <!-- begin-user-doc --> |
| 279 | * This default implementation returns null so that we can easily ignore cases; |
| 280 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 281 | * <!-- end-user-doc --> |
| 282 | * @return the new adapter. |
| 283 | * @see de.uka.ipd.sdq.stoex.Product |
| 284 | * @generated |
| 285 | */ |
| 286 | public Adapter createProductAdapter() { |
| 287 | return null; |
| 288 | } |
| 289 | |
| 290 | /** |
| 291 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.stoex.Power <em>Power</em>}'. |
| 292 | * <!-- begin-user-doc --> |
| 293 | * This default implementation returns null so that we can easily ignore cases; |
| 294 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 295 | * <!-- end-user-doc --> |
| 296 | * @return the new adapter. |
| 297 | * @see de.uka.ipd.sdq.stoex.Power |
| 298 | * @generated |
| 299 | */ |
| 300 | public Adapter createPowerAdapter() { |
| 301 | return null; |
| 302 | } |
| 303 | |
| 304 | /** |
| 305 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.stoex.Unary <em>Unary</em>}'. |
| 306 | * <!-- begin-user-doc --> |
| 307 | * This default implementation returns null so that we can easily ignore cases; |
| 308 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 309 | * <!-- end-user-doc --> |
| 310 | * @return the new adapter. |
| 311 | * @see de.uka.ipd.sdq.stoex.Unary |
| 312 | * @generated |
| 313 | */ |
| 314 | public Adapter createUnaryAdapter() { |
| 315 | return null; |
| 316 | } |
| 317 | |
| 318 | /** |
| 319 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.stoex.Atom <em>Atom</em>}'. |
| 320 | * <!-- begin-user-doc --> |
| 321 | * This default implementation returns null so that we can easily ignore cases; |
| 322 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 323 | * <!-- end-user-doc --> |
| 324 | * @return the new adapter. |
| 325 | * @see de.uka.ipd.sdq.stoex.Atom |
| 326 | * @generated |
| 327 | */ |
| 328 | public Adapter createAtomAdapter() { |
| 329 | return null; |
| 330 | } |
| 331 | |
| 332 | /** |
| 333 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.stoex.Variable <em>Variable</em>}'. |
| 334 | * <!-- begin-user-doc --> |
| 335 | * This default implementation returns null so that we can easily ignore cases; |
| 336 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 337 | * <!-- end-user-doc --> |
| 338 | * @return the new adapter. |
| 339 | * @see de.uka.ipd.sdq.stoex.Variable |
| 340 | * @generated |
| 341 | */ |
| 342 | public Adapter createVariableAdapter() { |
| 343 | return null; |
| 344 | } |
| 345 | |
| 346 | /** |
| 347 | * Creates a new adapter for the default case. |
| 348 | * <!-- begin-user-doc --> |
| 349 | * This default implementation returns null. |
| 350 | * <!-- end-user-doc --> |
| 351 | * @return the new adapter. |
| 352 | * @generated |
| 353 | */ |
| 354 | public Adapter createEObjectAdapter() { |
| 355 | return null; |
| 356 | } |
| 357 | |
| 358 | } //ParameterAdapterFactory |