Skip to main content
summaryrefslogtreecommitdiffstats
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.java151
1 files changed, 55 insertions, 96 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 5f6dcb4bb5..14b43e1d01 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
@@ -1,6 +1,12 @@
/**
- * <copyright>
- * </copyright>
+ * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
+ * 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
*
* $Id$
*/
@@ -29,22 +35,28 @@ import java.util.List;
* {@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.model1.Model1Package
* @generated
*/
public class Model1Switch<T>
{
/**
- * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2008 Eike Stepper, Germany.\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 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()
@@ -58,7 +70,6 @@ public class Model1Switch<T>
/**
* 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
*/
@@ -70,7 +81,6 @@ public class Model1Switch<T>
/**
* 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
*/
@@ -90,7 +100,6 @@ public class Model1Switch<T>
/**
* 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
*/
@@ -103,9 +112,7 @@ public class Model1Switch<T>
Address address = (Address)theEObject;
T result = caseAddress(address);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.COMPANY:
@@ -113,13 +120,9 @@ public class Model1Switch<T>
Company company = (Company)theEObject;
T result = caseCompany(company);
if (result == null)
- {
result = caseAddress(company);
- }
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.SUPPLIER:
@@ -127,13 +130,9 @@ public class Model1Switch<T>
Supplier supplier = (Supplier)theEObject;
T result = caseSupplier(supplier);
if (result == null)
- {
result = caseAddress(supplier);
- }
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.CUSTOMER:
@@ -141,13 +140,9 @@ public class Model1Switch<T>
Customer customer = (Customer)theEObject;
T result = caseCustomer(customer);
if (result == null)
- {
result = caseAddress(customer);
- }
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.ORDER:
@@ -155,9 +150,7 @@ public class Model1Switch<T>
Order order = (Order)theEObject;
T result = caseOrder(order);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.ORDER_DETAIL:
@@ -165,9 +158,7 @@ public class Model1Switch<T>
OrderDetail orderDetail = (OrderDetail)theEObject;
T result = caseOrderDetail(orderDetail);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.PURCHASE_ORDER:
@@ -175,13 +166,9 @@ public class Model1Switch<T>
PurchaseOrder purchaseOrder = (PurchaseOrder)theEObject;
T result = casePurchaseOrder(purchaseOrder);
if (result == null)
- {
result = caseOrder(purchaseOrder);
- }
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.SALES_ORDER:
@@ -189,13 +176,9 @@ public class Model1Switch<T>
SalesOrder salesOrder = (SalesOrder)theEObject;
T result = caseSalesOrder(salesOrder);
if (result == null)
- {
result = caseOrder(salesOrder);
- }
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.CATEGORY:
@@ -203,9 +186,7 @@ public class Model1Switch<T>
Category category = (Category)theEObject;
T result = caseCategory(category);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.PRODUCT1:
@@ -213,9 +194,7 @@ public class Model1Switch<T>
Product1 product1 = (Product1)theEObject;
T result = caseProduct1(product1);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.ORDER_ADDRESS:
@@ -223,21 +202,13 @@ public class Model1Switch<T>
OrderAddress orderAddress = (OrderAddress)theEObject;
T result = caseOrderAddress(orderAddress);
if (result == null)
- {
result = caseAddress(orderAddress);
- }
if (result == null)
- {
result = caseOrder(orderAddress);
- }
if (result == null)
- {
result = caseOrderDetail(orderAddress);
- }
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
default:
@@ -246,11 +217,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Address</em>'. <!-- begin-user-doc --> This
+ * Returns the result of interpreting the object as an instance of '<em>Address</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.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Address</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -261,11 +231,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Supplier</em>'. <!-- begin-user-doc --> This
+ * Returns the result of interpreting 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.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Supplier</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -276,11 +245,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Purchase Order</em>'. <!-- begin-user-doc -->
+ * 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.
+ * @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
@@ -291,11 +259,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Order Detail</em>'. <!-- begin-user-doc -->
+ * Returns the result of interpreting the object as an instance of '<em>Order Detail</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.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Order Detail</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -306,11 +273,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Order Address</em>'. <!-- begin-user-doc -->
+ * Returns the result of interpreting the object as an instance of '<em>Order Address</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.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Order Address</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -321,11 +287,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Category</em>'. <!-- begin-user-doc --> This
+ * Returns the result of interpreting the object as an instance of '<em>Category</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.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Category</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -336,11 +301,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Product1</em>'. <!-- begin-user-doc --> This
+ * Returns the result of interpreting the object as an instance of '<em>Product1</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.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Product1</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -351,11 +315,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Company</em>'. <!-- begin-user-doc --> This
+ * Returns the result of interpreting the object as an instance of '<em>Company</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.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Company</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -366,11 +329,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Customer</em>'. <!-- begin-user-doc --> This
+ * Returns the result of interpreting the object as an instance of '<em>Customer</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.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Customer</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -381,11 +343,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Order</em>'. <!-- begin-user-doc --> This
+ * 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.
+ * @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
@@ -396,11 +357,10 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Sales Order</em>'. <!-- begin-user-doc -->
+ * Returns the result of interpreting the object as an instance of '<em>Sales 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.
+ * @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Sales Order</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -411,12 +371,11 @@ public class Model1Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. <!-- begin-user-doc --> This
+ * 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.
+ * @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

Back to the top