diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util')
2 files changed, 91 insertions, 131 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1AdapterFactory.java index 84db001576..ad5b5ac088 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1AdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1AdapterFactory.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$ */ @@ -27,22 +33,28 @@ 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.model1.Model1Package * @generated */ public class Model1AdapterFactory extends AdapterFactoryImpl { /** - * 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 adapter factory. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public Model1AdapterFactory() @@ -54,10 +66,10 @@ public class Model1AdapterFactory extends AdapterFactoryImpl } /** - * Returns whether this factory is applicable for the type of the object. <!-- begin-user-doc --> This implementation + * 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 */ @@ -76,8 +88,8 @@ public class Model1AdapterFactory extends AdapterFactoryImpl } /** - * The switch that delegates to the <code>createXXX</code> methods. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * The switch that delegates to the <code>createXXX</code> methods. + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ protected Model1Switch<Adapter> modelSwitch = new Model1Switch<Adapter>() @@ -156,10 +168,9 @@ public class Model1AdapterFactory extends AdapterFactoryImpl }; /** - * Creates an adapter for the <code>target</code>. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @param target - * the object to adapt. + * 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 */ @@ -173,7 +184,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Address <em>Address</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.model1.Address * @generated @@ -187,7 +197,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Supplier <em>Supplier</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.model1.Supplier * @generated @@ -198,10 +207,9 @@ public class Model1AdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder - * <em>Purchase Order</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.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.model1.PurchaseOrder * @generated @@ -212,10 +220,9 @@ public class Model1AdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail - * <em>Order Detail</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail <em>Order Detail</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.model1.OrderDetail * @generated @@ -226,10 +233,9 @@ public class Model1AdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.OrderAddress - * <em>Order Address</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.OrderAddress <em>Order Address</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.model1.OrderAddress * @generated @@ -243,7 +249,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Category <em>Category</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.model1.Category * @generated @@ -257,7 +262,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Product1 <em>Product1</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.model1.Product1 * @generated @@ -271,7 +275,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Company <em>Company</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.model1.Company * @generated @@ -285,7 +288,6 @@ public class Model1AdapterFactory extends AdapterFactoryImpl * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Customer <em>Customer</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.model1.Customer * @generated @@ -310,10 +312,9 @@ public class Model1AdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder - * <em>Sales Order</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder <em>Sales 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.model1.SalesOrder * @generated @@ -324,9 +325,9 @@ public class Model1AdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for the default case. <!-- begin-user-doc --> This default implementation returns 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 */ 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 |