Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java135
1 files changed, 71 insertions, 64 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java
index 1a22891920..f147beff23 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java
@@ -6,40 +6,39 @@
*/
package org.eclipse.emf.cdo.tests.model1.util;
-import java.util.List;
-
-import org.eclipse.emf.cdo.tests.model1.*;
+import org.eclipse.emf.cdo.tests.model1.Model1Package;
+import org.eclipse.emf.cdo.tests.model1.PurchaseOrder;
+import org.eclipse.emf.cdo.tests.model1.Supplier;
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)}
+ * <!-- 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 -->
+ * 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.model1.Model1Package
* @generated
*/
public class Model1Switch
{
/**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
protected static Model1Package modelPackage;
/**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Creates an instance of the switch. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
public Model1Switch()
@@ -51,10 +50,12 @@ public class Model1Switch
}
/**
- * 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.
+ * 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 Object doSwitch(EObject theEObject)
@@ -63,10 +64,12 @@ public class Model1Switch
}
/**
- * 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.
+ * 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 Object doSwitch(EClass theEClass, EObject theEObject)
@@ -78,49 +81,52 @@ public class Model1Switch
else
{
List eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch((EClass)eSuperTypes.get(0), theEObject);
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch((EClass)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.
+ * 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 Object doSwitch(int classifierID, EObject theEObject)
{
switch (classifierID)
{
- case Model1Package.SUPPLIER:
- {
- Supplier supplier = (Supplier)theEObject;
- Object result = caseSupplier(supplier);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case Model1Package.PURCHASE_ORDER:
- {
- PurchaseOrder purchaseOrder = (PurchaseOrder)theEObject;
- Object result = casePurchaseOrder(purchaseOrder);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
+ case Model1Package.SUPPLIER:
+ {
+ Supplier supplier = (Supplier)theEObject;
+ Object result = caseSupplier(supplier);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case Model1Package.PURCHASE_ORDER:
+ {
+ PurchaseOrder purchaseOrder = (PurchaseOrder)theEObject;
+ Object result = casePurchaseOrder(purchaseOrder);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
}
}
/**
* Returns the result of interpretting the object as an instance of '<em>Supplier</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.
+ * <!-- 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 interpretting the object as an instance of '<em>Supplier</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -132,11 +138,11 @@ public class Model1Switch
/**
* Returns the result of interpretting 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.
+ * <!-- 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 interpretting the object as an instance of '<em>Purchase Order</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -148,11 +154,12 @@ public class Model1Switch
/**
* Returns the result of interpretting 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.
+ * <!-- 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 interpretting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
@@ -162,4 +169,4 @@ public class Model1Switch
return null;
}
-} //Model1Switch
+} // Model1Switch

Back to the top