Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/requirements/usecases/util/UsecasesSwitch.java')
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/requirements/usecases/util/UsecasesSwitch.java296
1 files changed, 296 insertions, 0 deletions
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/requirements/usecases/util/UsecasesSwitch.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/requirements/usecases/util/UsecasesSwitch.java
new file mode 100644
index 00000000000..49228c89f9f
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/requirements/usecases/util/UsecasesSwitch.java
@@ -0,0 +1,296 @@
+/**
+ */
+package org.eclipse.papyrus.eastadl.requirements.usecases.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.EAElement;
+import org.eclipse.papyrus.eastadl.infrastructure.elements.EAPackageableElement;
+import org.eclipse.papyrus.eastadl.infrastructure.elements.Relationship;
+import org.eclipse.papyrus.eastadl.infrastructure.elements.TraceableSpecification;
+import org.eclipse.papyrus.eastadl.requirements.usecases.Actor;
+import org.eclipse.papyrus.eastadl.requirements.usecases.Extend;
+import org.eclipse.papyrus.eastadl.requirements.usecases.ExtensionPoint;
+import org.eclipse.papyrus.eastadl.requirements.usecases.Include;
+import org.eclipse.papyrus.eastadl.requirements.usecases.RedefinableElement;
+import org.eclipse.papyrus.eastadl.requirements.usecases.UseCase;
+import org.eclipse.papyrus.eastadl.requirements.usecases.UsecasesPackage;
+
+/**
+ * <!-- 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 org.eclipse.papyrus.eastadl.requirements.usecases.UsecasesPackage
+ * @generated
+ */
+public class UsecasesSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static UsecasesPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public UsecasesSwitch() {
+ if (modelPackage == null) {
+ modelPackage = UsecasesPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * 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
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * 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 UsecasesPackage.EXTEND: {
+ Extend extend = (Extend)theEObject;
+ T result = caseExtend(extend);
+ if (result == null) result = caseRelationship(extend);
+ if (result == null) result = caseEAElement(extend);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case UsecasesPackage.EXTENSION_POINT: {
+ ExtensionPoint extensionPoint = (ExtensionPoint)theEObject;
+ T result = caseExtensionPoint(extensionPoint);
+ if (result == null) result = caseRedefinableElement(extensionPoint);
+ if (result == null) result = caseEAElement(extensionPoint);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case UsecasesPackage.REDEFINABLE_ELEMENT: {
+ RedefinableElement redefinableElement = (RedefinableElement)theEObject;
+ T result = caseRedefinableElement(redefinableElement);
+ if (result == null) result = caseEAElement(redefinableElement);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case UsecasesPackage.USE_CASE: {
+ UseCase useCase = (UseCase)theEObject;
+ T result = caseUseCase(useCase);
+ if (result == null) result = caseTraceableSpecification(useCase);
+ if (result == null) result = caseEAPackageableElement(useCase);
+ if (result == null) result = caseEAElement(useCase);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case UsecasesPackage.INCLUDE: {
+ Include include = (Include)theEObject;
+ T result = caseInclude(include);
+ if (result == null) result = caseRelationship(include);
+ if (result == null) result = caseEAElement(include);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case UsecasesPackage.ACTOR: {
+ Actor actor = (Actor)theEObject;
+ T result = caseActor(actor);
+ if (result == null) result = caseTraceableSpecification(actor);
+ if (result == null) result = caseEAPackageableElement(actor);
+ if (result == null) result = caseEAElement(actor);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Extend</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 interpreting the object as an instance of '<em>Extend</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseExtend(Extend object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Extension Point</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 interpreting the object as an instance of '<em>Extension Point</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseExtensionPoint(ExtensionPoint object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Redefinable Element</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 interpreting the object as an instance of '<em>Redefinable Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRedefinableElement(RedefinableElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Use Case</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 interpreting the object as an instance of '<em>Use Case</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseUseCase(UseCase object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Include</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 interpreting the object as an instance of '<em>Include</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseInclude(Include object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Actor</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 interpreting the object as an instance of '<em>Actor</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseActor(Actor object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EA Element</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 interpreting the object as an instance of '<em>EA Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEAElement(EAElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Relationship</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 interpreting the object as an instance of '<em>Relationship</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRelationship(Relationship object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EA Packageable Element</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 interpreting the object as an instance of '<em>EA Packageable Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEAPackageableElement(EAPackageableElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Traceable Specification</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 interpreting the object as an instance of '<em>Traceable Specification</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTraceableSpecification(TraceableSpecification object) {
+ return null;
+ }
+
+ /**
+ * 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.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //UsecasesSwitch

Back to the top