Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.emf.teneo.samples/src/main/util/MainSwitch.java')
-rwxr-xr-xtests/org.eclipse.emf.teneo.samples/src/main/util/MainSwitch.java270
1 files changed, 140 insertions, 130 deletions
diff --git a/tests/org.eclipse.emf.teneo.samples/src/main/util/MainSwitch.java b/tests/org.eclipse.emf.teneo.samples/src/main/util/MainSwitch.java
index 4aca61da4..f35523eca 100755
--- a/tests/org.eclipse.emf.teneo.samples/src/main/util/MainSwitch.java
+++ b/tests/org.eclipse.emf.teneo.samples/src/main/util/MainSwitch.java
@@ -14,31 +14,26 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
/**
- * <!-- 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.
+ * <!-- 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 main.MainPackage
* @generated
*/
public class MainSwitch {
/**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
protected static MainPackage 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 MainSwitch() {
@@ -48,9 +43,9 @@ public class MainSwitch {
}
/**
- * 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 -->
+ * 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
*/
@@ -59,97 +54,112 @@ public class MainSwitch {
}
/**
- * 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 -->
+ * 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) {
if (theEClass.eContainer() == modelPackage) {
return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
+ } 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 -->
+ * 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 MainPackage.CHILD_OBJECT2: {
- ChildObject2 childObject2 = (ChildObject2)theEObject;
- Object result = caseChildObject2(childObject2);
- if (result == null) result = caseBaseObject(childObject2);
- if (result == null) result = caseBaseComponent(childObject2);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case MainPackage.CHILD_OBJECT1: {
- ChildObject1 childObject1 = (ChildObject1)theEObject;
- Object result = caseChildObject1(childObject1);
- if (result == null) result = caseBaseObject(childObject1);
- if (result == null) result = caseBaseComponent(childObject1);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case MainPackage.BASE_OBJECT: {
- BaseObject baseObject = (BaseObject)theEObject;
- Object result = caseBaseObject(baseObject);
- if (result == null) result = caseBaseComponent(baseObject);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case MainPackage.BASE_GROUP: {
- BaseGroup baseGroup = (BaseGroup)theEObject;
- Object result = caseBaseGroup(baseGroup);
- if (result == null) result = caseBaseComponent(baseGroup);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case MainPackage.BASE_COMPONENT: {
- BaseComponent baseComponent = (BaseComponent)theEObject;
- Object result = caseBaseComponent(baseComponent);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case MainPackage.CHILD_OBJECT3: {
- ChildObject3 childObject3 = (ChildObject3)theEObject;
- Object result = caseChildObject3(childObject3);
- if (result == null) result = caseBaseObject(childObject3);
- if (result == null) result = caseBaseComponent(childObject3);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case MainPackage.CHILD_OBJECT4: {
- ChildObject4 childObject4 = (ChildObject4)theEObject;
- Object result = caseChildObject4(childObject4);
- if (result == null) result = caseBaseObject(childObject4);
- if (result == null) result = caseBaseComponent(childObject4);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
+ case MainPackage.CHILD_OBJECT2: {
+ ChildObject2 childObject2 = (ChildObject2) theEObject;
+ Object result = caseChildObject2(childObject2);
+ if (result == null)
+ result = caseBaseObject(childObject2);
+ if (result == null)
+ result = caseBaseComponent(childObject2);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case MainPackage.CHILD_OBJECT1: {
+ ChildObject1 childObject1 = (ChildObject1) theEObject;
+ Object result = caseChildObject1(childObject1);
+ if (result == null)
+ result = caseBaseObject(childObject1);
+ if (result == null)
+ result = caseBaseComponent(childObject1);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case MainPackage.BASE_OBJECT: {
+ BaseObject baseObject = (BaseObject) theEObject;
+ Object result = caseBaseObject(baseObject);
+ if (result == null)
+ result = caseBaseComponent(baseObject);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case MainPackage.BASE_GROUP: {
+ BaseGroup baseGroup = (BaseGroup) theEObject;
+ Object result = caseBaseGroup(baseGroup);
+ if (result == null)
+ result = caseBaseComponent(baseGroup);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case MainPackage.BASE_COMPONENT: {
+ BaseComponent baseComponent = (BaseComponent) theEObject;
+ Object result = caseBaseComponent(baseComponent);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case MainPackage.CHILD_OBJECT3: {
+ ChildObject3 childObject3 = (ChildObject3) theEObject;
+ Object result = caseChildObject3(childObject3);
+ if (result == null)
+ result = caseBaseObject(childObject3);
+ if (result == null)
+ result = caseBaseComponent(childObject3);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case MainPackage.CHILD_OBJECT4: {
+ ChildObject4 childObject4 = (ChildObject4) theEObject;
+ Object result = caseChildObject4(childObject4);
+ if (result == null)
+ result = caseBaseObject(childObject4);
+ if (result == null)
+ result = caseBaseComponent(childObject4);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
}
}
/**
- * Returns the result of interpretting the object as an instance of '<em>Child Object2</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.
+ * Returns the result of interpretting the object as an instance of '<em>Child Object2</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 interpretting the object as an instance of '<em>Child Object2</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -159,12 +169,12 @@ public class MainSwitch {
}
/**
- * Returns the result of interpretting the object as an instance of '<em>Child Object1</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.
+ * Returns the result of interpretting the object as an instance of '<em>Child Object1</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 interpretting the object as an instance of '<em>Child Object1</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -174,12 +184,12 @@ public class MainSwitch {
}
/**
- * Returns the result of interpretting the object as an instance of '<em>Base Object</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.
+ * Returns the result of interpretting the object as an instance of '<em>Base Object</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 interpretting the object as an instance of '<em>Base Object</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -189,12 +199,12 @@ public class MainSwitch {
}
/**
- * Returns the result of interpretting the object as an instance of '<em>Base Group</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.
+ * Returns the result of interpretting the object as an instance of '<em>Base Group</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 interpretting the object as an instance of '<em>Base Group</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -205,11 +215,11 @@ public class MainSwitch {
/**
* Returns the result of interpretting the object as an instance of '<em>Base Component</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>Base Component</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -219,12 +229,12 @@ public class MainSwitch {
}
/**
- * Returns the result of interpretting the object as an instance of '<em>Child Object3</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.
+ * Returns the result of interpretting the object as an instance of '<em>Child Object3</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 interpretting the object as an instance of '<em>Child Object3</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -234,12 +244,12 @@ public class MainSwitch {
}
/**
- * Returns the result of interpretting the object as an instance of '<em>Child Object4</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.
+ * Returns the result of interpretting the object as an instance of '<em>Child Object4</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 interpretting the object as an instance of '<em>Child Object4</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -249,12 +259,12 @@ public class MainSwitch {
}
/**
- * 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.
+ * 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.
* @return the result of interpretting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
@@ -263,4 +273,4 @@ public class MainSwitch {
return null;
}
-} //MainSwitch
+} // MainSwitch

Back to the top