diff options
Diffstat (limited to 'extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/elements/util/ElementsSwitch.java')
-rw-r--r-- | extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/elements/util/ElementsSwitch.java | 238 |
1 files changed, 150 insertions, 88 deletions
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/elements/util/ElementsSwitch.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/elements/util/ElementsSwitch.java index 5caf7f31fca..93c996911af 100644 --- a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/elements/util/ElementsSwitch.java +++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/elements/util/ElementsSwitch.java @@ -18,6 +18,7 @@ package org.eclipse.papyrus.eastadl.infrastructure.elements.util; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.papyrus.eastadl.infrastructure.elements.*; import org.eclipse.papyrus.eastadl.infrastructure.elements.Comment; import org.eclipse.papyrus.eastadl.infrastructure.elements.Context; import org.eclipse.papyrus.eastadl.infrastructure.elements.EAElement; @@ -34,21 +35,23 @@ import org.eclipse.papyrus.eastadl.infrastructure.elements.TraceableSpecificatio /** * <!-- 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, + * 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 org.eclipse.papyrus.eastadl.infrastructure.elements.ElementsPackage * @generated */ public class ElementsSwitch<T> extends Switch<T> { + /** * The cached model package * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ protected static ElementsPackage modelPackage; @@ -57,10 +60,11 @@ public class ElementsSwitch<T> extends Switch<T> { * Creates an instance of the switch. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ public ElementsSwitch() { - if (modelPackage == null) { + if(modelPackage == null) { modelPackage = ElementsPackage.eINSTANCE; } } @@ -69,6 +73,7 @@ public class ElementsSwitch<T> extends Switch<T> { * Checks whether this is a switch for the given package. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @parameter ePackage the package in question. * @return whether this is a switch for the given package. * @generated @@ -84,7 +89,9 @@ public class ElementsSwitch<T> extends Switch<T> { * 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>Context</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -99,7 +106,9 @@ public class ElementsSwitch<T> extends Switch<T> { * 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>Multi Level Reference</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -114,7 +123,9 @@ public class ElementsSwitch<T> extends Switch<T> { * 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>Rationale</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -129,7 +140,9 @@ public class ElementsSwitch<T> extends Switch<T> { * 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>EA Package</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -144,7 +157,9 @@ public class ElementsSwitch<T> extends Switch<T> { * 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>Comment</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -159,7 +174,9 @@ public class ElementsSwitch<T> extends Switch<T> { * 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>EA Element</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -174,7 +191,9 @@ public class ElementsSwitch<T> extends Switch<T> { * 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>Realization</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -189,7 +208,9 @@ public class ElementsSwitch<T> extends Switch<T> { * 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>Relationship</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -204,7 +225,9 @@ public class ElementsSwitch<T> extends Switch<T> { * 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>Traceable Specification</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -219,7 +242,9 @@ public class ElementsSwitch<T> extends Switch<T> { * 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>EA Packageable Element</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -234,7 +259,9 @@ public class ElementsSwitch<T> extends Switch<T> { * 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>Rationale</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -249,7 +276,9 @@ public class ElementsSwitch<T> extends Switch<T> { * 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 @@ -263,84 +292,117 @@ public class ElementsSwitch<T> extends Switch<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 */ @Override protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case ElementsPackage.TRACEABLE_SPECIFICATION: { - TraceableSpecification traceableSpecification = (TraceableSpecification)theEObject; - T result = caseTraceableSpecification(traceableSpecification); - if (result == null) result = caseEAPackageableElement(traceableSpecification); - if (result == null) result = caseEAElement(traceableSpecification); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ElementsPackage.EA_PACKAGEABLE_ELEMENT: { - EAPackageableElement eaPackageableElement = (EAPackageableElement)theEObject; - T result = caseEAPackageableElement(eaPackageableElement); - if (result == null) result = caseEAElement(eaPackageableElement); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ElementsPackage.REALIZATION: { - Realization realization = (Realization)theEObject; - T result = caseRealization(realization); - if (result == null) result = caseRelationship(realization); - if (result == null) result = caseEAElement(realization); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ElementsPackage.RELATIONSHIP: { - Relationship relationship = (Relationship)theEObject; - T result = caseRelationship(relationship); - if (result == null) result = caseEAElement(relationship); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ElementsPackage.CONTEXT: { - Context context = (Context)theEObject; - T result = caseContext(context); - if (result == null) result = caseEAElement(context); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ElementsPackage.MULTI_LEVEL_REFERENCE: { - MultiLevelReference multiLevelReference = (MultiLevelReference)theEObject; - T result = caseMultiLevelReference(multiLevelReference); - if (result == null) result = caseRelationship(multiLevelReference); - if (result == null) result = caseEAElement(multiLevelReference); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ElementsPackage.RATIONALE: { - Rationale rationale = (Rationale)theEObject; - T result = caseRationale(rationale); - if (result == null) result = caseModelelements_Rationale(rationale); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ElementsPackage.EA_PACKAGE: { - EAPackage eaPackage = (EAPackage)theEObject; - T result = caseEAPackage(eaPackage); - if (result == null) result = caseEAElement(eaPackage); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ElementsPackage.COMMENT: { - Comment comment = (Comment)theEObject; - T result = caseComment(comment); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ElementsPackage.EA_ELEMENT: { - EAElement eaElement = (EAElement)theEObject; - T result = caseEAElement(eaElement); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); + switch(classifierID) { + case ElementsPackage.TRACEABLE_SPECIFICATION: + { + TraceableSpecification traceableSpecification = (TraceableSpecification)theEObject; + T result = caseTraceableSpecification(traceableSpecification); + if(result == null) + result = caseEAPackageableElement(traceableSpecification); + if(result == null) + result = caseEAElement(traceableSpecification); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ElementsPackage.EA_PACKAGEABLE_ELEMENT: + { + EAPackageableElement eaPackageableElement = (EAPackageableElement)theEObject; + T result = caseEAPackageableElement(eaPackageableElement); + if(result == null) + result = caseEAElement(eaPackageableElement); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ElementsPackage.REALIZATION: + { + Realization realization = (Realization)theEObject; + T result = caseRealization(realization); + if(result == null) + result = caseRelationship(realization); + if(result == null) + result = caseEAElement(realization); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ElementsPackage.RELATIONSHIP: + { + Relationship relationship = (Relationship)theEObject; + T result = caseRelationship(relationship); + if(result == null) + result = caseEAElement(relationship); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ElementsPackage.CONTEXT: + { + Context context = (Context)theEObject; + T result = caseContext(context); + if(result == null) + result = caseEAElement(context); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ElementsPackage.MULTI_LEVEL_REFERENCE: + { + MultiLevelReference multiLevelReference = (MultiLevelReference)theEObject; + T result = caseMultiLevelReference(multiLevelReference); + if(result == null) + result = caseRelationship(multiLevelReference); + if(result == null) + result = caseEAElement(multiLevelReference); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ElementsPackage.RATIONALE: + { + Rationale rationale = (Rationale)theEObject; + T result = caseRationale(rationale); + if(result == null) + result = caseModelelements_Rationale(rationale); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ElementsPackage.EA_PACKAGE: + { + EAPackage eaPackage = (EAPackage)theEObject; + T result = caseEAPackage(eaPackage); + if(result == null) + result = caseEAElement(eaPackage); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ElementsPackage.COMMENT: + { + Comment comment = (Comment)theEObject; + T result = caseComment(comment); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case ElementsPackage.EA_ELEMENT: + { + EAElement eaElement = (EAElement)theEObject; + T result = caseEAElement(eaElement); + if(result == null) + result = defaultCase(theEObject); + return result; + } + default: + return defaultCase(theEObject); } } |