Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-07-26 05:54:41 +0000
committerEike Stepper2011-07-26 05:54:41 +0000
commit0f8ed7d4359c117cf215b1789ea6e1989b3dbfad (patch)
tree0d8cbf44912d9d9f1f06465f884c5f1f7dc12699 /plugins/org.eclipse.emf.cdo.tests.model5
parentd175de7e5770859d4375ce952eb419465430892e (diff)
downloadcdo-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.model5')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/META-INF/MANIFEST.MF9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/model/model5.legacy-genmodel2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5AdapterFactory.java419
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5Switch.java459
5 files changed, 7 insertions, 885 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests.model5/META-INF/MANIFEST.MF
index 37c7aec146..40bcd4addb 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.tests.model5;singleton:=true
-Bundle-Version: 3.0.100.qualifier
+Bundle-Version: 3.0.200.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -11,7 +11,6 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
Export-Package: org.eclipse.emf.cdo.tests.legacy.model5;version="3.0.100",
org.eclipse.emf.cdo.tests.legacy.model5.impl;version="3.0.100",
- org.eclipse.emf.cdo.tests.legacy.model5.util;version="3.0.100",
- org.eclipse.emf.cdo.tests.model5;version="3.0.100",
- org.eclipse.emf.cdo.tests.model5.impl;version="3.0.100",
- org.eclipse.emf.cdo.tests.model5.util;version="3.0.100"
+ org.eclipse.emf.cdo.tests.model5;version="3.0.200",
+ org.eclipse.emf.cdo.tests.model5.impl;version="3.0.200",
+ org.eclipse.emf.cdo.tests.model5.util;version="3.0.200"
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel
index c2d97563fd..ef49dd5daf 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel
@@ -6,7 +6,8 @@
modelPluginID="org.eclipse.emf.cdo.tests.model5" modelName="Model5" updateClasspath="false"
rootExtendsClass="org.eclipse.emf.internal.cdo.CDOObjectImpl" reflectiveDelegation="true"
codeFormatting="true" testsDirectory="" importerID="org.eclipse.emf.importer.ecore"
- featureDelegation="Reflective" complianceLevel="5.0" providerRootExtendsClass="org.eclipse.emf.cdo.edit.CDOItemProviderAdapter">
+ featureDelegation="Reflective" complianceLevel="5.0" providerRootExtendsClass="org.eclipse.emf.cdo.edit.CDOItemProviderAdapter"
+ runtimeVersion="2.6">
<foreignModel>model5.ecore</foreignModel>
<modelPluginVariables>CDO=org.eclipse.emf.cdo</modelPluginVariables>
<genPackages prefix="Model5" basePackage="org.eclipse.emf.cdo.tests" disposableProviderFactory="true"
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.legacy-genmodel b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.legacy-genmodel
index 9c588ae725..be9a306251 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.legacy-genmodel
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.legacy-genmodel
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; Eike Stepper - initial API and implementation" modelDirectory="/org.eclipse.emf.cdo.tests.model5/src" editDirectory="" editorDirectory="" modelPluginID="org.eclipse.emf.cdo.tests.model5" modelName="Model5" updateClasspath="false" codeFormatting="true" testsDirectory="" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" providerRootExtendsClass="">
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; Eike Stepper - initial API and implementation" modelDirectory="/org.eclipse.emf.cdo.tests.model5/src" editDirectory="" editorDirectory="" modelPluginID="org.eclipse.emf.cdo.tests.model5" modelName="Model5" updateClasspath="false" codeFormatting="true" testsDirectory="" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" providerRootExtendsClass="" runtimeVersion="2.6">
<foreignModel>model5.ecore</foreignModel>
<modelPluginVariables>CDO=org.eclipse.emf.cdo</modelPluginVariables>
<genPackages prefix="Model5" basePackage="org.eclipse.emf.cdo.tests.legacy" disposableProviderFactory="true" literalsInterface="false" extensibleProviderFactory="true" childCreationExtenders="true">
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5AdapterFactory.java
deleted file mode 100644
index 4b7006806f..0000000000
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5AdapterFactory.java
+++ /dev/null
@@ -1,419 +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.model5.util;
-
-import org.eclipse.emf.cdo.tests.legacy.model5.Model5Package;
-import org.eclipse.emf.cdo.tests.model5.Doctor;
-import org.eclipse.emf.cdo.tests.model5.GenListOfBoolean;
-import org.eclipse.emf.cdo.tests.model5.GenListOfChar;
-import org.eclipse.emf.cdo.tests.model5.GenListOfDate;
-import org.eclipse.emf.cdo.tests.model5.GenListOfDouble;
-import org.eclipse.emf.cdo.tests.model5.GenListOfFloat;
-import org.eclipse.emf.cdo.tests.model5.GenListOfInt;
-import org.eclipse.emf.cdo.tests.model5.GenListOfIntArray;
-import org.eclipse.emf.cdo.tests.model5.GenListOfInteger;
-import org.eclipse.emf.cdo.tests.model5.GenListOfLong;
-import org.eclipse.emf.cdo.tests.model5.GenListOfShort;
-import org.eclipse.emf.cdo.tests.model5.GenListOfString;
-import org.eclipse.emf.cdo.tests.model5.Manager;
-import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
-
-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;
-
-/**
- * <!-- 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.model5.Model5Package
- * @generated
- */
-public class Model5AdapterFactory extends AdapterFactoryImpl
-{
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static final String copyright = "Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation";
-
- /**
- * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected static Model5Package modelPackage;
-
- /**
- * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Model5AdapterFactory()
- {
- if (modelPackage == null)
- {
- modelPackage = Model5Package.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 Model5Switch<Adapter> modelSwitch = new Model5Switch<Adapter>()
- {
- @Override
- public Adapter caseTestFeatureMap(TestFeatureMap object)
- {
- return createTestFeatureMapAdapter();
- }
-
- @Override
- public Adapter caseManager(Manager object)
- {
- return createManagerAdapter();
- }
-
- @Override
- public Adapter caseDoctor(Doctor object)
- {
- return createDoctorAdapter();
- }
-
- @Override
- public Adapter caseGenListOfString(GenListOfString object)
- {
- return createGenListOfStringAdapter();
- }
-
- @Override
- public Adapter caseGenListOfInt(GenListOfInt object)
- {
- return createGenListOfIntAdapter();
- }
-
- @Override
- public Adapter caseGenListOfInteger(GenListOfInteger object)
- {
- return createGenListOfIntegerAdapter();
- }
-
- @Override
- public Adapter caseGenListOfLong(GenListOfLong object)
- {
- return createGenListOfLongAdapter();
- }
-
- @Override
- public Adapter caseGenListOfBoolean(GenListOfBoolean object)
- {
- return createGenListOfBooleanAdapter();
- }
-
- @Override
- public Adapter caseGenListOfShort(GenListOfShort object)
- {
- return createGenListOfShortAdapter();
- }
-
- @Override
- public Adapter caseGenListOfFloat(GenListOfFloat object)
- {
- return createGenListOfFloatAdapter();
- }
-
- @Override
- public Adapter caseGenListOfDouble(GenListOfDouble object)
- {
- return createGenListOfDoubleAdapter();
- }
-
- @Override
- public Adapter caseGenListOfDate(GenListOfDate object)
- {
- return createGenListOfDateAdapter();
- }
-
- @Override
- public Adapter caseGenListOfChar(GenListOfChar object)
- {
- return createGenListOfCharAdapter();
- }
-
- @Override
- public Adapter caseGenListOfIntArray(GenListOfIntArray object)
- {
- return createGenListOfIntArrayAdapter();
- }
-
- @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.model5.TestFeatureMap
- * <em>Test Feature 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 org.eclipse.emf.cdo.tests.legacy.model5.TestFeatureMap
- * @generated
- */
- public Adapter createTestFeatureMapAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model5.Manager
- * <em>Manager</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.model5.Manager
- * @generated
- */
- public Adapter createManagerAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model5.Doctor
- * <em>Doctor</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.model5.Doctor
- * @generated
- */
- public Adapter createDoctorAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model5.GenListOfString
- * <em>Gen List Of String</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.model5.GenListOfString
- * @generated
- */
- public Adapter createGenListOfStringAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model5.GenListOfInt
- * <em>Gen List Of Int</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.model5.GenListOfInt
- * @generated
- */
- public Adapter createGenListOfIntAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model5.GenListOfInteger
- * <em>Gen List Of Integer</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.model5.GenListOfInteger
- * @generated
- */
- public Adapter createGenListOfIntegerAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model5.GenListOfLong
- * <em>Gen List Of Long</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.model5.GenListOfLong
- * @generated
- */
- public Adapter createGenListOfLongAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model5.GenListOfBoolean
- * <em>Gen List Of Boolean</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.model5.GenListOfBoolean
- * @generated
- */
- public Adapter createGenListOfBooleanAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model5.GenListOfShort
- * <em>Gen List Of Short</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.model5.GenListOfShort
- * @generated
- */
- public Adapter createGenListOfShortAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model5.GenListOfFloat
- * <em>Gen List Of Float</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.model5.GenListOfFloat
- * @generated
- */
- public Adapter createGenListOfFloatAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model5.GenListOfDouble
- * <em>Gen List Of Double</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.model5.GenListOfDouble
- * @generated
- */
- public Adapter createGenListOfDoubleAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model5.GenListOfDate
- * <em>Gen List Of Date</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.model5.GenListOfDate
- * @generated
- */
- public Adapter createGenListOfDateAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model5.GenListOfChar
- * <em>Gen List Of Char</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.model5.GenListOfChar
- * @generated
- */
- public Adapter createGenListOfCharAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model5.GenListOfIntArray
- * <em>Gen List Of Int Array</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.model5.GenListOfIntArray
- * @generated
- */
- public Adapter createGenListOfIntArrayAdapter()
- {
- 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;
- }
-
-} // Model5AdapterFactory
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5Switch.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5Switch.java
deleted file mode 100644
index 5acb7664d8..0000000000
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/util/Model5Switch.java
+++ /dev/null
@@ -1,459 +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.model5.util;
-
-import org.eclipse.emf.cdo.tests.legacy.model5.Model5Package;
-import org.eclipse.emf.cdo.tests.model5.Doctor;
-import org.eclipse.emf.cdo.tests.model5.GenListOfBoolean;
-import org.eclipse.emf.cdo.tests.model5.GenListOfChar;
-import org.eclipse.emf.cdo.tests.model5.GenListOfDate;
-import org.eclipse.emf.cdo.tests.model5.GenListOfDouble;
-import org.eclipse.emf.cdo.tests.model5.GenListOfFloat;
-import org.eclipse.emf.cdo.tests.model5.GenListOfInt;
-import org.eclipse.emf.cdo.tests.model5.GenListOfIntArray;
-import org.eclipse.emf.cdo.tests.model5.GenListOfInteger;
-import org.eclipse.emf.cdo.tests.model5.GenListOfLong;
-import org.eclipse.emf.cdo.tests.model5.GenListOfShort;
-import org.eclipse.emf.cdo.tests.model5.GenListOfString;
-import org.eclipse.emf.cdo.tests.model5.Manager;
-import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-import java.util.List;
-
-/**
- * <!-- 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.model5.Model5Package
- * @generated
- */
-public class Model5Switch<T>
-{
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static final String copyright = "Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation";
-
- /**
- * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected static Model5Package modelPackage;
-
- /**
- * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Model5Switch()
- {
- if (modelPackage == null)
- {
- modelPackage = Model5Package.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 Model5Package.TEST_FEATURE_MAP:
- {
- TestFeatureMap testFeatureMap = (TestFeatureMap)theEObject;
- T result = caseTestFeatureMap(testFeatureMap);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model5Package.MANAGER:
- {
- Manager manager = (Manager)theEObject;
- T result = caseManager(manager);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model5Package.DOCTOR:
- {
- Doctor doctor = (Doctor)theEObject;
- T result = caseDoctor(doctor);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model5Package.GEN_LIST_OF_STRING:
- {
- GenListOfString genListOfString = (GenListOfString)theEObject;
- T result = caseGenListOfString(genListOfString);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model5Package.GEN_LIST_OF_INT:
- {
- GenListOfInt genListOfInt = (GenListOfInt)theEObject;
- T result = caseGenListOfInt(genListOfInt);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model5Package.GEN_LIST_OF_INTEGER:
- {
- GenListOfInteger genListOfInteger = (GenListOfInteger)theEObject;
- T result = caseGenListOfInteger(genListOfInteger);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model5Package.GEN_LIST_OF_LONG:
- {
- GenListOfLong genListOfLong = (GenListOfLong)theEObject;
- T result = caseGenListOfLong(genListOfLong);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model5Package.GEN_LIST_OF_BOOLEAN:
- {
- GenListOfBoolean genListOfBoolean = (GenListOfBoolean)theEObject;
- T result = caseGenListOfBoolean(genListOfBoolean);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model5Package.GEN_LIST_OF_SHORT:
- {
- GenListOfShort genListOfShort = (GenListOfShort)theEObject;
- T result = caseGenListOfShort(genListOfShort);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model5Package.GEN_LIST_OF_FLOAT:
- {
- GenListOfFloat genListOfFloat = (GenListOfFloat)theEObject;
- T result = caseGenListOfFloat(genListOfFloat);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model5Package.GEN_LIST_OF_DOUBLE:
- {
- GenListOfDouble genListOfDouble = (GenListOfDouble)theEObject;
- T result = caseGenListOfDouble(genListOfDouble);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model5Package.GEN_LIST_OF_DATE:
- {
- GenListOfDate genListOfDate = (GenListOfDate)theEObject;
- T result = caseGenListOfDate(genListOfDate);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model5Package.GEN_LIST_OF_CHAR:
- {
- GenListOfChar genListOfChar = (GenListOfChar)theEObject;
- T result = caseGenListOfChar(genListOfChar);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- case Model5Package.GEN_LIST_OF_INT_ARRAY:
- {
- GenListOfIntArray genListOfIntArray = (GenListOfIntArray)theEObject;
- T result = caseGenListOfIntArray(genListOfIntArray);
- if (result == null)
- result = defaultCase(theEObject);
- return result;
- }
- default:
- return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Test Feature 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>Test Feature Map</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseTestFeatureMap(TestFeatureMap object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Manager</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>Manager</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseManager(Manager object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Doctor</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>Doctor</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseDoctor(Doctor object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Gen List Of String</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>Gen List Of String</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseGenListOfString(GenListOfString object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Gen List Of Int</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>Gen List Of Int</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseGenListOfInt(GenListOfInt object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Gen List Of Integer</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>Gen List Of Integer</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseGenListOfInteger(GenListOfInteger object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Gen List Of Long</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>Gen List Of Long</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseGenListOfLong(GenListOfLong object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Gen List Of Boolean</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>Gen List Of Boolean</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseGenListOfBoolean(GenListOfBoolean object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Gen List Of Short</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>Gen List Of Short</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseGenListOfShort(GenListOfShort object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Gen List Of Float</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>Gen List Of Float</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseGenListOfFloat(GenListOfFloat object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Gen List Of Double</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>Gen List Of Double</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseGenListOfDouble(GenListOfDouble object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Gen List Of Date</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>Gen List Of Date</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseGenListOfDate(GenListOfDate object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Gen List Of Char</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>Gen List Of Char</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseGenListOfChar(GenListOfChar object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Gen List Of Int Array</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>Gen List Of Int Array</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseGenListOfIntArray(GenListOfIntArray 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;
- }
-
-} // Model5Switch

Back to the top