Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelSwitch.java')
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelSwitch.java263
1 files changed, 263 insertions, 0 deletions
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelSwitch.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelSwitch.java
new file mode 100644
index 00000000..4192bc7d
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelSwitch.java
@@ -0,0 +1,263 @@
+/**
+ */
+package org.eclipse.bpmn2.modeler.examples.customtask.MyModel.util;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.EventDefinition;
+import org.eclipse.bpmn2.FlowElement;
+import org.eclipse.bpmn2.RootElement;
+import org.eclipse.bpmn2.modeler.examples.customtask.MyModel.*;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.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 org.eclipse.bpmn2.modeler.examples.customtask.MyModel.MyModelPackage
+ * @generated
+ */
+public class MyModelSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static MyModelPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MyModelSwitch() {
+ if (modelPackage == null) {
+ modelPackage = MyModelPackage.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 MyModelPackage.DOCUMENT_ROOT: {
+ DocumentRoot documentRoot = (DocumentRoot)theEObject;
+ T result = caseDocumentRoot(documentRoot);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case MyModelPackage.PARAMETER: {
+ Parameter parameter = (Parameter)theEObject;
+ T result = caseParameter(parameter);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case MyModelPackage.TASK_CONFIG: {
+ TaskConfig taskConfig = (TaskConfig)theEObject;
+ T result = caseTaskConfig(taskConfig);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case MyModelPackage.MY_EVENT_DEFINITION: {
+ MyEventDefinition myEventDefinition = (MyEventDefinition)theEObject;
+ T result = caseMyEventDefinition(myEventDefinition);
+ if (result == null) result = caseEventDefinition(myEventDefinition);
+ if (result == null) result = caseRootElement(myEventDefinition);
+ if (result == null) result = caseBaseElement(myEventDefinition);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case MyModelPackage.TEMPORAL_DEPENDENCY: {
+ TemporalDependency temporalDependency = (TemporalDependency)theEObject;
+ T result = caseTemporalDependency(temporalDependency);
+ if (result == null) result = caseFlowElement(temporalDependency);
+ if (result == null) result = caseBaseElement(temporalDependency);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Document Root</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>Document Root</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDocumentRoot(DocumentRoot object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Parameter</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>Parameter</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseParameter(Parameter object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Task Config</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>Task Config</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTaskConfig(TaskConfig object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>My Event Definition</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>My Event Definition</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseMyEventDefinition(MyEventDefinition object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Temporal Dependency</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>Temporal Dependency</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTemporalDependency(TemporalDependency object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Base 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>Base Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBaseElement(BaseElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Root 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>Root Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRootElement(RootElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Event Definition</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>Event Definition</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEventDefinition(EventDefinition object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Flow 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>Flow Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFlowElement(FlowElement 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;
+ }
+
+} //MyModelSwitch

Back to the top