| 1 | /** |
| 2 | * Copyright 2006, SDQ Group, University Karlsruhe (TH) |
| 3 | * |
| 4 | * $Id$ |
| 5 | */ |
| 6 | package de.uka.ipd.sdq.context.aggregatedUsageContext.util; |
| 7 | |
| 8 | import org.eclipse.emf.common.notify.Adapter; |
| 9 | import org.eclipse.emf.common.notify.Notifier; |
| 10 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; |
| 11 | import org.eclipse.emf.ecore.EObject; |
| 12 | |
| 13 | import de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedCommunication; |
| 14 | import de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedResourceDemand; |
| 15 | import de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedUsageContextPackage; |
| 16 | import de.uka.ipd.sdq.context.aggregatedUsageContext.ComputedAggregatedUsage; |
| 17 | import de.uka.ipd.sdq.context.aggregatedUsageContext.ServiceExecutionContext; |
| 18 | |
| 19 | /** |
| 20 | * <!-- begin-user-doc --> |
| 21 | * The <b>Adapter Factory</b> for the model. |
| 22 | * It provides an adapter <code>createXXX</code> method for each class of the model. |
| 23 | * <!-- end-user-doc --> |
| 24 | * @see de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedUsageContextPackage |
| 25 | * @generated |
| 26 | */ |
| 27 | public class AggregatedUsageContextAdapterFactory extends AdapterFactoryImpl { |
| 28 | /** |
| 29 | * <!-- begin-user-doc --> |
| 30 | * <!-- end-user-doc --> |
| 31 | * @generated |
| 32 | */ |
| 33 | public static final String copyright = "Copyright 2006, SDQ Group, University Karlsruhe (TH)"; |
| 34 | |
| 35 | /** |
| 36 | * The cached model package. |
| 37 | * <!-- begin-user-doc --> |
| 38 | * <!-- end-user-doc --> |
| 39 | * @generated |
| 40 | */ |
| 41 | protected static AggregatedUsageContextPackage modelPackage; |
| 42 | |
| 43 | /** |
| 44 | * Creates an instance of the adapter factory. |
| 45 | * <!-- begin-user-doc --> |
| 46 | * <!-- end-user-doc --> |
| 47 | * @generated |
| 48 | */ |
| 49 | public AggregatedUsageContextAdapterFactory() { |
| 50 | if (modelPackage == null) { |
| 51 | modelPackage = AggregatedUsageContextPackage.eINSTANCE; |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Returns whether this factory is applicable for the type of the object. |
| 57 | * <!-- begin-user-doc --> |
| 58 | * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. |
| 59 | * <!-- end-user-doc --> |
| 60 | * @return whether this factory is applicable for the type of the object. |
| 61 | * @generated |
| 62 | */ |
| 63 | @Override |
| 64 | public boolean isFactoryForType(Object object) { |
| 65 | if (object == modelPackage) { |
| 66 | return true; |
| 67 | } |
| 68 | if (object instanceof EObject) { |
| 69 | return ((EObject)object).eClass().getEPackage() == modelPackage; |
| 70 | } |
| 71 | return false; |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * The switch that delegates to the <code>createXXX</code> methods. |
| 76 | * <!-- begin-user-doc --> |
| 77 | * <!-- end-user-doc --> |
| 78 | * @generated |
| 79 | */ |
| 80 | protected AggregatedUsageContextSwitch<Adapter> modelSwitch = |
| 81 | new AggregatedUsageContextSwitch<Adapter>() { |
| 82 | @Override |
| 83 | public Adapter caseServiceExecutionContext(ServiceExecutionContext object) { |
| 84 | return createServiceExecutionContextAdapter(); |
| 85 | } |
| 86 | @Override |
| 87 | public Adapter caseAggregatedResourceDemand(AggregatedResourceDemand object) { |
| 88 | return createAggregatedResourceDemandAdapter(); |
| 89 | } |
| 90 | @Override |
| 91 | public Adapter caseAggregatedCommunication(AggregatedCommunication object) { |
| 92 | return createAggregatedCommunicationAdapter(); |
| 93 | } |
| 94 | @Override |
| 95 | public Adapter caseComputedAggregatedUsage(ComputedAggregatedUsage object) { |
| 96 | return createComputedAggregatedUsageAdapter(); |
| 97 | } |
| 98 | @Override |
| 99 | public Adapter defaultCase(EObject object) { |
| 100 | return createEObjectAdapter(); |
| 101 | } |
| 102 | }; |
| 103 | |
| 104 | /** |
| 105 | * Creates an adapter for the <code>target</code>. |
| 106 | * <!-- begin-user-doc --> |
| 107 | * <!-- end-user-doc --> |
| 108 | * @param target the object to adapt. |
| 109 | * @return the adapter for the <code>target</code>. |
| 110 | * @generated |
| 111 | */ |
| 112 | @Override |
| 113 | public Adapter createAdapter(Notifier target) { |
| 114 | return modelSwitch.doSwitch((EObject)target); |
| 115 | } |
| 116 | |
| 117 | |
| 118 | /** |
| 119 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.context.aggregatedUsageContext.ServiceExecutionContext <em>Service Execution Context</em>}'. |
| 120 | * <!-- begin-user-doc --> |
| 121 | * This default implementation returns null so that we can easily ignore cases; |
| 122 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 123 | * <!-- end-user-doc --> |
| 124 | * @return the new adapter. |
| 125 | * @see de.uka.ipd.sdq.context.aggregatedUsageContext.ServiceExecutionContext |
| 126 | * @generated |
| 127 | */ |
| 128 | public Adapter createServiceExecutionContextAdapter() { |
| 129 | return null; |
| 130 | } |
| 131 | |
| 132 | /** |
| 133 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedResourceDemand <em>Aggregated Resource Demand</em>}'. |
| 134 | * <!-- begin-user-doc --> |
| 135 | * This default implementation returns null so that we can easily ignore cases; |
| 136 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 137 | * <!-- end-user-doc --> |
| 138 | * @return the new adapter. |
| 139 | * @see de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedResourceDemand |
| 140 | * @generated |
| 141 | */ |
| 142 | public Adapter createAggregatedResourceDemandAdapter() { |
| 143 | return null; |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedCommunication <em>Aggregated Communication</em>}'. |
| 148 | * <!-- begin-user-doc --> |
| 149 | * This default implementation returns null so that we can easily ignore cases; |
| 150 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 151 | * <!-- end-user-doc --> |
| 152 | * @return the new adapter. |
| 153 | * @see de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedCommunication |
| 154 | * @generated |
| 155 | */ |
| 156 | public Adapter createAggregatedCommunicationAdapter() { |
| 157 | return null; |
| 158 | } |
| 159 | |
| 160 | /** |
| 161 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.context.aggregatedUsageContext.ComputedAggregatedUsage <em>Computed Aggregated Usage</em>}'. |
| 162 | * <!-- begin-user-doc --> |
| 163 | * This default implementation returns null so that we can easily ignore cases; |
| 164 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 165 | * <!-- end-user-doc --> |
| 166 | * @return the new adapter. |
| 167 | * @see de.uka.ipd.sdq.context.aggregatedUsageContext.ComputedAggregatedUsage |
| 168 | * @generated |
| 169 | */ |
| 170 | public Adapter createComputedAggregatedUsageAdapter() { |
| 171 | return null; |
| 172 | } |
| 173 | |
| 174 | /** |
| 175 | * Creates a new adapter for the default case. |
| 176 | * <!-- begin-user-doc --> |
| 177 | * This default implementation returns null. |
| 178 | * <!-- end-user-doc --> |
| 179 | * @return the new adapter. |
| 180 | * @generated |
| 181 | */ |
| 182 | public Adapter createEObjectAdapter() { |
| 183 | return null; |
| 184 | } |
| 185 | |
| 186 | } //AggregatedUsageContextAdapterFactory |