| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package de.uka.ipd.sdq.units.util; |
| 8 | |
| 9 | import de.uka.ipd.sdq.units.*; |
| 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.units.UnitsPackage |
| 24 | * @generated |
| 25 | */ |
| 26 | public class UnitsAdapterFactory 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 UnitsPackage modelPackage; |
| 40 | |
| 41 | /** |
| 42 | * Creates an instance of the adapter factory. |
| 43 | * <!-- begin-user-doc --> |
| 44 | * <!-- end-user-doc --> |
| 45 | * @generated |
| 46 | */ |
| 47 | public UnitsAdapterFactory() { |
| 48 | if (modelPackage == null) { |
| 49 | modelPackage = UnitsPackage.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 UnitsSwitch<Adapter> modelSwitch = |
| 79 | new UnitsSwitch<Adapter>() { |
| 80 | @Override |
| 81 | public Adapter caseUnitCarryingElement(UnitCarryingElement object) { |
| 82 | return createUnitCarryingElementAdapter(); |
| 83 | } |
| 84 | @Override |
| 85 | public Adapter caseUnit(Unit object) { |
| 86 | return createUnitAdapter(); |
| 87 | } |
| 88 | @Override |
| 89 | public Adapter caseBaseUnit(BaseUnit object) { |
| 90 | return createBaseUnitAdapter(); |
| 91 | } |
| 92 | @Override |
| 93 | public Adapter caseUnitRepository(UnitRepository object) { |
| 94 | return createUnitRepositoryAdapter(); |
| 95 | } |
| 96 | @Override |
| 97 | public Adapter caseUnitMultiplication(UnitMultiplication object) { |
| 98 | return createUnitMultiplicationAdapter(); |
| 99 | } |
| 100 | @Override |
| 101 | public Adapter caseUnitPower(UnitPower object) { |
| 102 | return createUnitPowerAdapter(); |
| 103 | } |
| 104 | @Override |
| 105 | public Adapter caseUnitLiteral(UnitLiteral object) { |
| 106 | return createUnitLiteralAdapter(); |
| 107 | } |
| 108 | @Override |
| 109 | public Adapter defaultCase(EObject object) { |
| 110 | return createEObjectAdapter(); |
| 111 | } |
| 112 | }; |
| 113 | |
| 114 | /** |
| 115 | * Creates an adapter for the <code>target</code>. |
| 116 | * <!-- begin-user-doc --> |
| 117 | * <!-- end-user-doc --> |
| 118 | * @param target the object to adapt. |
| 119 | * @return the adapter for the <code>target</code>. |
| 120 | * @generated |
| 121 | */ |
| 122 | @Override |
| 123 | public Adapter createAdapter(Notifier target) { |
| 124 | return modelSwitch.doSwitch((EObject)target); |
| 125 | } |
| 126 | |
| 127 | |
| 128 | /** |
| 129 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.units.UnitCarryingElement <em>Unit Carrying Element</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.units.UnitCarryingElement |
| 136 | * @generated |
| 137 | */ |
| 138 | public Adapter createUnitCarryingElementAdapter() { |
| 139 | return null; |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.units.Unit <em>Unit</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.units.Unit |
| 150 | * @generated |
| 151 | */ |
| 152 | public Adapter createUnitAdapter() { |
| 153 | return null; |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.units.BaseUnit <em>Base Unit</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.units.BaseUnit |
| 164 | * @generated |
| 165 | */ |
| 166 | public Adapter createBaseUnitAdapter() { |
| 167 | return null; |
| 168 | } |
| 169 | |
| 170 | /** |
| 171 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.units.UnitRepository <em>Unit Repository</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.units.UnitRepository |
| 178 | * @generated |
| 179 | */ |
| 180 | public Adapter createUnitRepositoryAdapter() { |
| 181 | return null; |
| 182 | } |
| 183 | |
| 184 | /** |
| 185 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.units.UnitMultiplication <em>Unit Multiplication</em>}'. |
| 186 | * <!-- begin-user-doc --> |
| 187 | * This default implementation returns null so that we can easily ignore cases; |
| 188 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 189 | * <!-- end-user-doc --> |
| 190 | * @return the new adapter. |
| 191 | * @see de.uka.ipd.sdq.units.UnitMultiplication |
| 192 | * @generated |
| 193 | */ |
| 194 | public Adapter createUnitMultiplicationAdapter() { |
| 195 | return null; |
| 196 | } |
| 197 | |
| 198 | /** |
| 199 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.units.UnitPower <em>Unit Power</em>}'. |
| 200 | * <!-- begin-user-doc --> |
| 201 | * This default implementation returns null so that we can easily ignore cases; |
| 202 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 203 | * <!-- end-user-doc --> |
| 204 | * @return the new adapter. |
| 205 | * @see de.uka.ipd.sdq.units.UnitPower |
| 206 | * @generated |
| 207 | */ |
| 208 | public Adapter createUnitPowerAdapter() { |
| 209 | return null; |
| 210 | } |
| 211 | |
| 212 | /** |
| 213 | * Creates a new adapter for an object of class '{@link de.uka.ipd.sdq.units.UnitLiteral <em>Unit Literal</em>}'. |
| 214 | * <!-- begin-user-doc --> |
| 215 | * This default implementation returns null so that we can easily ignore cases; |
| 216 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
| 217 | * <!-- end-user-doc --> |
| 218 | * @return the new adapter. |
| 219 | * @see de.uka.ipd.sdq.units.UnitLiteral |
| 220 | * @generated |
| 221 | */ |
| 222 | public Adapter createUnitLiteralAdapter() { |
| 223 | return null; |
| 224 | } |
| 225 | |
| 226 | /** |
| 227 | * Creates a new adapter for the default case. |
| 228 | * <!-- begin-user-doc --> |
| 229 | * This default implementation returns null. |
| 230 | * <!-- end-user-doc --> |
| 231 | * @return the new adapter. |
| 232 | * @generated |
| 233 | */ |
| 234 | public Adapter createEObjectAdapter() { |
| 235 | return null; |
| 236 | } |
| 237 | |
| 238 | } //UnitsAdapterFactory |