diff options
Diffstat (limited to 'plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/defs/util/TestDefsSwitch.java')
-rw-r--r-- | plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/defs/util/TestDefsSwitch.java | 59 |
1 files changed, 24 insertions, 35 deletions
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/defs/util/TestDefsSwitch.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/defs/util/TestDefsSwitch.java index 37efde6860..43dca50e98 100644 --- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/defs/util/TestDefsSwitch.java +++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/defs/util/TestDefsSwitch.java @@ -25,22 +25,21 @@ 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.net4j.util.tests.defs.TestDefsPackage * @generated */ public class TestDefsSwitch<T> { /** - * The cached model package <!-- begin-user-doc --> <!-- end-user-doc --> - * + * The cached model package + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ protected static TestDefsPackage 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 TestDefsSwitch() @@ -54,7 +53,6 @@ public class TestDefsSwitch<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 */ @@ -66,7 +64,6 @@ public class TestDefsSwitch<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 */ @@ -79,14 +76,16 @@ public class TestDefsSwitch<T> else { List<EClass> eSuperTypes = theEClass.getESuperTypes(); - return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); + 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 */ @@ -94,31 +93,23 @@ public class TestDefsSwitch<T> { switch (classifierID) { - case TestDefsPackage.TEST_DEF: - { - TestDef testDef = (TestDef)theEObject; - T result = caseTestDef(testDef); - if (result == null) + case TestDefsPackage.TEST_DEF: { - result = caseDef(testDef); + TestDef testDef = (TestDef)theEObject; + T result = caseTestDef(testDef); + if (result == null) result = caseDef(testDef); + if (result == null) result = defaultCase(theEObject); + return result; } - if (result == null) - { - result = defaultCase(theEObject); - } - return result; - } - default: - return defaultCase(theEObject); + default: return defaultCase(theEObject); } } /** - * Returns the result of interpreting the object as an instance of '<em>Test Def</em>'. <!-- begin-user-doc --> This + * Returns the result of interpreting the object as an instance of '<em>Test Def</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>Test Def</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -129,11 +120,10 @@ public class TestDefsSwitch<T> } /** - * Returns the result of interpreting the object as an instance of '<em>Def</em>'. <!-- begin-user-doc --> This + * Returns the result of interpreting the object as an instance of '<em>Def</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>Def</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -144,12 +134,11 @@ public class TestDefsSwitch<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 |