diff options
author | Eike Stepper | 2011-07-26 05:54:41 +0000 |
---|---|---|
committer | Eike Stepper | 2011-07-26 05:54:41 +0000 |
commit | 0f8ed7d4359c117cf215b1789ea6e1989b3dbfad (patch) | |
tree | 0d8cbf44912d9d9f1f06465f884c5f1f7dc12699 /plugins/org.eclipse.emf.cdo.tests.model2 | |
parent | d175de7e5770859d4375ce952eb419465430892e (diff) | |
download | cdo-0f8ed7d4359c117cf215b1789ea6e1989b3dbfad.tar.gz cdo-0f8ed7d4359c117cf215b1789ea6e1989b3dbfad.tar.xz cdo-0f8ed7d4359c117cf215b1789ea6e1989b3dbfad.zip |
[349599] [CDO Tests] EMF runtime compatibility issue and duplicate code in test models
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349599
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.model2')
3 files changed, 4 insertions, 1228 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests.model2/META-INF/MANIFEST.MF index 8ef39c20ce..603c191806 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model2/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.cdo.tests.model2/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.eclipse.emf.cdo.tests.model2; singleton:=true -Bundle-Version: 3.0.100.qualifier +Bundle-Version: 3.0.200.qualifier Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-Localization: plugin @@ -13,7 +13,6 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)", org.eclipse.emf.cdo.tests.model1;bundle-version="[3.0.0,4.0.0)";visibility:=reexport Export-Package: org.eclipse.emf.cdo.tests.legacy.model2;version="3.0.100", org.eclipse.emf.cdo.tests.legacy.model2.impl;version="3.0.100", - org.eclipse.emf.cdo.tests.legacy.model2.util;version="3.0.100", - org.eclipse.emf.cdo.tests.model2;version="3.0.100", - org.eclipse.emf.cdo.tests.model2.impl;version="3.0.100", - org.eclipse.emf.cdo.tests.model2.util;version="3.0.100" + org.eclipse.emf.cdo.tests.model2;version="3.0.200", + org.eclipse.emf.cdo.tests.model2.impl;version="3.0.200", + org.eclipse.emf.cdo.tests.model2.util;version="3.0.200" diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2AdapterFactory.java deleted file mode 100644 index 57df908520..0000000000 --- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2AdapterFactory.java +++ /dev/null @@ -1,577 +0,0 @@ -/** - * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Eike Stepper - initial API and implementation - */ -package org.eclipse.emf.cdo.tests.legacy.model2.util; - -import org.eclipse.emf.cdo.tests.legacy.model2.Model2Package; -import org.eclipse.emf.cdo.tests.model1.Address; -import org.eclipse.emf.cdo.tests.model1.Order; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.VAT; -import org.eclipse.emf.cdo.tests.model2.EnumListHolder; -import org.eclipse.emf.cdo.tests.model2.MapHolder; -import org.eclipse.emf.cdo.tests.model2.NotUnsettable; -import org.eclipse.emf.cdo.tests.model2.NotUnsettableWithDefault; -import org.eclipse.emf.cdo.tests.model2.PersistentContainment; -import org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder; -import org.eclipse.emf.cdo.tests.model2.Task; -import org.eclipse.emf.cdo.tests.model2.TaskContainer; -import org.eclipse.emf.cdo.tests.model2.TransientContainer; -import org.eclipse.emf.cdo.tests.model2.Unsettable1; -import org.eclipse.emf.cdo.tests.model2.Unsettable2WithDefault; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EObject; - -import java.util.Map; - -/** - * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides an adapter <code>createXXX</code> - * method for each class of the model. <!-- end-user-doc --> - * - * @see org.eclipse.emf.cdo.tests.legacy.model2.Model2Package - * @generated - */ -public class Model2AdapterFactory extends AdapterFactoryImpl -{ - /** - * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected static Model2Package modelPackage; - - /** - * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Model2AdapterFactory() - { - if (modelPackage == null) - { - modelPackage = Model2Package.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. <!-- begin-user-doc --> This implementation - * returns <code>true</code> if the object is either the model's package or is an instance object of the model. <!-- - * end-user-doc --> - * - * @return whether this factory is applicable for the type of the object. - * @generated - */ - @Override - public boolean isFactoryForType(Object object) - { - if (object == modelPackage) - { - return true; - } - if (object instanceof EObject) - { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch that delegates to the <code>createXXX</code> methods. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected Model2Switch<Adapter> modelSwitch = new Model2Switch<Adapter>() - { - @Override - public Adapter caseSpecialPurchaseOrder(SpecialPurchaseOrder object) - { - return createSpecialPurchaseOrderAdapter(); - } - - @Override - public Adapter caseTaskContainer(TaskContainer object) - { - return createTaskContainerAdapter(); - } - - @Override - public Adapter caseTask(Task object) - { - return createTaskAdapter(); - } - - @Override - public Adapter caseUnsettable1(Unsettable1 object) - { - return createUnsettable1Adapter(); - } - - @Override - public Adapter caseUnsettable2WithDefault(Unsettable2WithDefault object) - { - return createUnsettable2WithDefaultAdapter(); - } - - @Override - public Adapter casePersistentContainment(PersistentContainment object) - { - return createPersistentContainmentAdapter(); - } - - @Override - public Adapter caseTransientContainer(TransientContainer object) - { - return createTransientContainerAdapter(); - } - - @Override - public Adapter caseNotUnsettable(NotUnsettable object) - { - return createNotUnsettableAdapter(); - } - - @Override - public Adapter caseNotUnsettableWithDefault(NotUnsettableWithDefault object) - { - return createNotUnsettableWithDefaultAdapter(); - } - - @Override - public Adapter caseMapHolder(MapHolder object) - { - return createMapHolderAdapter(); - } - - @Override - public Adapter caseStringToStringMap(Map.Entry<String, String> object) - { - return createStringToStringMapAdapter(); - } - - @Override - public Adapter caseIntegerToStringMap(Map.Entry<Integer, String> object) - { - return createIntegerToStringMapAdapter(); - } - - @Override - public Adapter caseStringToVATMap(Map.Entry<String, VAT> object) - { - return createStringToVATMapAdapter(); - } - - @Override - public Adapter caseStringToAddressContainmentMap(Map.Entry<String, Address> object) - { - return createStringToAddressContainmentMapAdapter(); - } - - @Override - public Adapter caseStringToAddressReferenceMap(Map.Entry<String, Address> object) - { - return createStringToAddressReferenceMapAdapter(); - } - - @Override - public Adapter caseEObjectToEObjectMap(Map.Entry<EObject, EObject> object) - { - return createEObjectToEObjectMapAdapter(); - } - - @Override - public Adapter caseEObjectToEObjectKeyContainedMap(Map.Entry<EObject, EObject> object) - { - return createEObjectToEObjectKeyContainedMapAdapter(); - } - - @Override - public Adapter caseEObjectToEObjectBothContainedMap(Map.Entry<EObject, EObject> object) - { - return createEObjectToEObjectBothContainedMapAdapter(); - } - - @Override - public Adapter caseEObjectToEObjectValueContainedMap(Map.Entry<EObject, EObject> object) - { - return createEObjectToEObjectValueContainedMapAdapter(); - } - - @Override - public Adapter caseEnumListHolder(EnumListHolder object) - { - return createEnumListHolderAdapter(); - } - - @Override - public Adapter caseOrder(Order object) - { - return createOrderAdapter(); - } - - @Override - public Adapter casePurchaseOrder(PurchaseOrder object) - { - return createPurchaseOrderAdapter(); - } - - @Override - public Adapter defaultCase(EObject object) - { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the <code>target</code>. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param target - * the object to adapt. - * @return the adapter for the <code>target</code>. - * @generated - */ - @Override - public Adapter createAdapter(Notifier target) - { - return modelSwitch.doSwitch((EObject)target); - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model2.SpecialPurchaseOrder - * <em>Special Purchase Order</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can - * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- - * end-user-doc --> - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.legacy.model2.SpecialPurchaseOrder - * @generated - */ - public Adapter createSpecialPurchaseOrderAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model2.TaskContainer - * <em>Task Container</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily - * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.legacy.model2.TaskContainer - * @generated - */ - public Adapter createTaskContainerAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model2.Task <em>Task</em>}'. - * <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.legacy.model2.Task - * @generated - */ - public Adapter createTaskAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model2.Unsettable1 - * <em>Unsettable1</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily - * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.legacy.model2.Unsettable1 - * @generated - */ - public Adapter createUnsettable1Adapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.emf.cdo.tests.legacy.model2.Unsettable2WithDefault <em>Unsettable2 With Default</em>}'. <!-- - * begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.legacy.model2.Unsettable2WithDefault - * @generated - */ - public Adapter createUnsettable2WithDefaultAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model2.PersistentContainment - * <em>Persistent Containment</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can - * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- - * end-user-doc --> - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.legacy.model2.PersistentContainment - * @generated - */ - public Adapter createPersistentContainmentAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model2.TransientContainer - * <em>Transient Container</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can - * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- - * end-user-doc --> - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.legacy.model2.TransientContainer - * @generated - */ - public Adapter createTransientContainerAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model2.NotUnsettable - * <em>Not Unsettable</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily - * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.legacy.model2.NotUnsettable - * @generated - */ - public Adapter createNotUnsettableAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.emf.cdo.tests.legacy.model2.NotUnsettableWithDefault <em>Not Unsettable With Default</em>}'. - * <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.legacy.model2.NotUnsettableWithDefault - * @generated - */ - public Adapter createNotUnsettableWithDefaultAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model2.MapHolder - * <em>Map Holder</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily - * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.legacy.model2.MapHolder - * @generated - */ - public Adapter createMapHolderAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link java.util.Map.Entry <em>String To String Map</em>}'. <!-- - * begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see java.util.Map.Entry - * @generated - */ - public Adapter createStringToStringMapAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link java.util.Map.Entry <em>Integer To String Map</em>}'. <!-- - * begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see java.util.Map.Entry - * @generated - */ - public Adapter createIntegerToStringMapAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link java.util.Map.Entry <em>String To VAT Map</em>}'. <!-- - * begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see java.util.Map.Entry - * @generated - */ - public Adapter createStringToVATMapAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link java.util.Map.Entry - * <em>String To Address Containment Map</em>}'. <!-- begin-user-doc --> This default implementation returns null so - * that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * - * @return the new adapter. - * @see java.util.Map.Entry - * @generated - */ - public Adapter createStringToAddressContainmentMapAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link java.util.Map.Entry <em>String To Address Reference Map</em>} - * '. <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful - * to ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see java.util.Map.Entry - * @generated - */ - public Adapter createStringToAddressReferenceMapAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link java.util.Map.Entry <em>EObject To EObject Map</em>}'. <!-- - * begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see java.util.Map.Entry - * @generated - */ - public Adapter createEObjectToEObjectMapAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link java.util.Map.Entry - * <em>EObject To EObject Key Contained Map</em>}'. <!-- begin-user-doc --> This default implementation returns null - * so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * - * @return the new adapter. - * @see java.util.Map.Entry - * @generated - */ - public Adapter createEObjectToEObjectKeyContainedMapAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link java.util.Map.Entry - * <em>EObject To EObject Both Contained Map</em>}'. <!-- begin-user-doc --> This default implementation returns null - * so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * - * @return the new adapter. - * @see java.util.Map.Entry - * @generated - */ - public Adapter createEObjectToEObjectBothContainedMapAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link java.util.Map.Entry - * <em>EObject To EObject Value Contained Map</em>}'. <!-- begin-user-doc --> This default implementation returns null - * so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * - * @return the new adapter. - * @see java.util.Map.Entry - * @generated - */ - public Adapter createEObjectToEObjectValueContainedMapAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model2.EnumListHolder - * <em>Enum List Holder</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily - * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.legacy.model2.EnumListHolder - * @generated - */ - public Adapter createEnumListHolderAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Order <em>Order</em>} - * '. <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful - * to ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Order - * @generated - */ - public Adapter createOrderAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model1.PurchaseOrder - * <em>Purchase Order</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily - * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.legacy.model1.PurchaseOrder - * @generated - */ - public Adapter createPurchaseOrderAdapter() - { - return null; - } - - /** - * Creates a new adapter for the default case. <!-- begin-user-doc --> This default implementation returns null. <!-- - * end-user-doc --> - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() - { - return null; - } - -} // Model2AdapterFactory diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2Switch.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2Switch.java deleted file mode 100644 index 940dd3abaf..0000000000 --- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2Switch.java +++ /dev/null @@ -1,646 +0,0 @@ -/** - * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Eike Stepper - initial API and implementation - */ -package org.eclipse.emf.cdo.tests.legacy.model2.util; - -import org.eclipse.emf.cdo.tests.legacy.model2.Model2Package; -import org.eclipse.emf.cdo.tests.model1.Address; -import org.eclipse.emf.cdo.tests.model1.Order; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.VAT; -import org.eclipse.emf.cdo.tests.model2.EnumListHolder; -import org.eclipse.emf.cdo.tests.model2.MapHolder; -import org.eclipse.emf.cdo.tests.model2.NotUnsettable; -import org.eclipse.emf.cdo.tests.model2.NotUnsettableWithDefault; -import org.eclipse.emf.cdo.tests.model2.PersistentContainment; -import org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder; -import org.eclipse.emf.cdo.tests.model2.Task; -import org.eclipse.emf.cdo.tests.model2.TaskContainer; -import org.eclipse.emf.cdo.tests.model2.TransientContainer; -import org.eclipse.emf.cdo.tests.model2.Unsettable1; -import org.eclipse.emf.cdo.tests.model2.Unsettable2WithDefault; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; - -import java.util.List; -import java.util.Map; - -/** - * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance hierarchy. It supports the call - * {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model, - * starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is - * returned, which is the result of the switch. <!-- end-user-doc --> - * - * @see org.eclipse.emf.cdo.tests.legacy.model2.Model2Package - * @generated - */ -public class Model2Switch<T> -{ - /** - * The cached model package <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected static Model2Package modelPackage; - - /** - * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public Model2Switch() - { - if (modelPackage == null) - { - modelPackage = Model2Package.eINSTANCE; - } - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - public T doSwitch(EObject theEObject) - { - return doSwitch(theEObject.eClass(), theEObject); - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - protected T doSwitch(EClass theEClass, EObject theEObject) - { - if (theEClass.eContainer() == modelPackage) - { - return doSwitch(theEClass.getClassifierID(), theEObject); - } - else - { - List<EClass> eSuperTypes = theEClass.getESuperTypes(); - return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); - } - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - protected T doSwitch(int classifierID, EObject theEObject) - { - switch (classifierID) - { - case Model2Package.SPECIAL_PURCHASE_ORDER: - { - SpecialPurchaseOrder specialPurchaseOrder = (SpecialPurchaseOrder)theEObject; - T result = caseSpecialPurchaseOrder(specialPurchaseOrder); - if (result == null) - result = casePurchaseOrder(specialPurchaseOrder); - if (result == null) - result = caseOrder(specialPurchaseOrder); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.TASK_CONTAINER: - { - TaskContainer taskContainer = (TaskContainer)theEObject; - T result = caseTaskContainer(taskContainer); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.TASK: - { - Task task = (Task)theEObject; - T result = caseTask(task); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.UNSETTABLE1: - { - Unsettable1 unsettable1 = (Unsettable1)theEObject; - T result = caseUnsettable1(unsettable1); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.UNSETTABLE2_WITH_DEFAULT: - { - Unsettable2WithDefault unsettable2WithDefault = (Unsettable2WithDefault)theEObject; - T result = caseUnsettable2WithDefault(unsettable2WithDefault); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.PERSISTENT_CONTAINMENT: - { - PersistentContainment persistentContainment = (PersistentContainment)theEObject; - T result = casePersistentContainment(persistentContainment); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.TRANSIENT_CONTAINER: - { - TransientContainer transientContainer = (TransientContainer)theEObject; - T result = caseTransientContainer(transientContainer); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.NOT_UNSETTABLE: - { - NotUnsettable notUnsettable = (NotUnsettable)theEObject; - T result = caseNotUnsettable(notUnsettable); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.NOT_UNSETTABLE_WITH_DEFAULT: - { - NotUnsettableWithDefault notUnsettableWithDefault = (NotUnsettableWithDefault)theEObject; - T result = caseNotUnsettableWithDefault(notUnsettableWithDefault); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.MAP_HOLDER: - { - MapHolder mapHolder = (MapHolder)theEObject; - T result = caseMapHolder(mapHolder); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.STRING_TO_STRING_MAP: - { - @SuppressWarnings("unchecked") - Map.Entry<String, String> stringToStringMap = (Map.Entry<String, String>)theEObject; - T result = caseStringToStringMap(stringToStringMap); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.INTEGER_TO_STRING_MAP: - { - @SuppressWarnings("unchecked") - Map.Entry<Integer, String> integerToStringMap = (Map.Entry<Integer, String>)theEObject; - T result = caseIntegerToStringMap(integerToStringMap); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.STRING_TO_VAT_MAP: - { - @SuppressWarnings("unchecked") - Map.Entry<String, VAT> stringToVATMap = (Map.Entry<String, VAT>)theEObject; - T result = caseStringToVATMap(stringToVATMap); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.STRING_TO_ADDRESS_CONTAINMENT_MAP: - { - @SuppressWarnings("unchecked") - Map.Entry<String, Address> stringToAddressContainmentMap = (Map.Entry<String, Address>)theEObject; - T result = caseStringToAddressContainmentMap(stringToAddressContainmentMap); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.STRING_TO_ADDRESS_REFERENCE_MAP: - { - @SuppressWarnings("unchecked") - Map.Entry<String, Address> stringToAddressReferenceMap = (Map.Entry<String, Address>)theEObject; - T result = caseStringToAddressReferenceMap(stringToAddressReferenceMap); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.EOBJECT_TO_EOBJECT_MAP: - { - @SuppressWarnings("unchecked") - Map.Entry<EObject, EObject> eObjectToEObjectMap = (Map.Entry<EObject, EObject>)theEObject; - T result = caseEObjectToEObjectMap(eObjectToEObjectMap); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.EOBJECT_TO_EOBJECT_KEY_CONTAINED_MAP: - { - @SuppressWarnings("unchecked") - Map.Entry<EObject, EObject> eObjectToEObjectKeyContainedMap = (Map.Entry<EObject, EObject>)theEObject; - T result = caseEObjectToEObjectKeyContainedMap(eObjectToEObjectKeyContainedMap); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.EOBJECT_TO_EOBJECT_BOTH_CONTAINED_MAP: - { - @SuppressWarnings("unchecked") - Map.Entry<EObject, EObject> eObjectToEObjectBothContainedMap = (Map.Entry<EObject, EObject>)theEObject; - T result = caseEObjectToEObjectBothContainedMap(eObjectToEObjectBothContainedMap); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.EOBJECT_TO_EOBJECT_VALUE_CONTAINED_MAP: - { - @SuppressWarnings("unchecked") - Map.Entry<EObject, EObject> eObjectToEObjectValueContainedMap = (Map.Entry<EObject, EObject>)theEObject; - T result = caseEObjectToEObjectValueContainedMap(eObjectToEObjectValueContainedMap); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model2Package.ENUM_LIST_HOLDER: - { - EnumListHolder enumListHolder = (EnumListHolder)theEObject; - T result = caseEnumListHolder(enumListHolder); - if (result == null) - result = defaultCase(theEObject); - return result; - } - default: - return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Special Purchase Order</em>'. <!-- - * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- - * end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Special Purchase Order</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseSpecialPurchaseOrder(SpecialPurchaseOrder object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Task Container</em>'. <!-- begin-user-doc --> - * This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Task Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseTaskContainer(TaskContainer object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Task</em>'. <!-- begin-user-doc --> This - * implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Task</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseTask(Task object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Unsettable1</em>'. <!-- begin-user-doc --> - * This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Unsettable1</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseUnsettable1(Unsettable1 object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Unsettable2 With Default</em>'. <!-- - * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- - * end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Unsettable2 With Default</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseUnsettable2WithDefault(Unsettable2WithDefault object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Persistent Containment</em>'. <!-- - * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- - * end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Persistent Containment</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T casePersistentContainment(PersistentContainment object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Transient Container</em>'. <!-- begin-user-doc - * --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Transient Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseTransientContainer(TransientContainer object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Not Unsettable</em>'. <!-- begin-user-doc --> - * This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Not Unsettable</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseNotUnsettable(NotUnsettable object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Not Unsettable With Default</em>'. <!-- - * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- - * end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Not Unsettable With Default</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseNotUnsettableWithDefault(NotUnsettableWithDefault object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Map Holder</em>'. <!-- begin-user-doc --> This - * implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Map Holder</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseMapHolder(MapHolder object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>String To String Map</em>'. <!-- - * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- - * end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>String To String Map</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseStringToStringMap(Map.Entry<String, String> object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Integer To String Map</em>'. <!-- - * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- - * end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Integer To String Map</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseIntegerToStringMap(Map.Entry<Integer, String> object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>String To VAT Map</em>'. <!-- begin-user-doc - * --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>String To VAT Map</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseStringToVATMap(Map.Entry<String, VAT> object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>String To Address Containment Map</em>'. <!-- - * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- - * end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>String To Address Containment Map</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseStringToAddressContainmentMap(Map.Entry<String, Address> object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>String To Address Reference Map</em>'. <!-- - * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- - * end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>String To Address Reference Map</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseStringToAddressReferenceMap(Map.Entry<String, Address> object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>EObject To EObject Map</em>'. <!-- - * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- - * end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject To EObject Map</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseEObjectToEObjectMap(Map.Entry<EObject, EObject> object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>EObject To EObject Key Contained Map</em>'. - * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject To EObject Key Contained Map</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseEObjectToEObjectKeyContainedMap(Map.Entry<EObject, EObject> object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>EObject To EObject Both Contained Map</em>'. - * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject To EObject Both Contained Map</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseEObjectToEObjectBothContainedMap(Map.Entry<EObject, EObject> object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>EObject To EObject Value Contained Map</em>'. - * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject To EObject Value Contained Map</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseEObjectToEObjectValueContainedMap(Map.Entry<EObject, EObject> object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Enum List Holder</em>'. <!-- begin-user-doc - * --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Enum List Holder</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseEnumListHolder(EnumListHolder object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Order</em>'. <!-- begin-user-doc --> This - * implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Order</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseOrder(Order object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Purchase Order</em>'. <!-- begin-user-doc --> - * This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Purchase Order</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T casePurchaseOrder(PurchaseOrder object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. <!-- begin-user-doc --> This - * implementation returns null; returning a non-null result will terminate the switch, but this is the last case - * anyway. <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public T defaultCase(EObject object) - { - return null; - } - -} // Model2Switch |