| /** |
| */ |
| package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.util; |
| |
| import org.eclipse.bpmn2.BaseElement; |
| import org.eclipse.bpmn2.CallableElement; |
| import org.eclipse.bpmn2.ItemAwareElement; |
| import org.eclipse.bpmn2.RootElement; |
| import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.*; |
| import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.DocumentRoot; |
| import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.DroolsPackage; |
| import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.GlobalType; |
| import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.ImportType; |
| import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.MetaDataType; |
| import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.MetaValueType; |
| import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.OnEntryScriptType; |
| import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.OnExitScriptType; |
| 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.runtime.jboss.jbpm5.model.drools.DroolsPackage |
| * @generated |
| */ |
| public class DroolsSwitch<T> extends Switch<T> { |
| /** |
| * The cached model package |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected static DroolsPackage modelPackage; |
| |
| /** |
| * Creates an instance of the switch. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DroolsSwitch() { |
| if (modelPackage == null) { |
| modelPackage = DroolsPackage.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 DroolsPackage.DOCUMENT_ROOT: { |
| DocumentRoot documentRoot = (DocumentRoot)theEObject; |
| T result = caseDocumentRoot(documentRoot); |
| if (result == null) result = caseBpmn2_DocumentRoot(documentRoot); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case DroolsPackage.GLOBAL_TYPE: { |
| GlobalType globalType = (GlobalType)theEObject; |
| T result = caseGlobalType(globalType); |
| if (result == null) result = caseItemAwareElement(globalType); |
| if (result == null) result = caseBaseElement(globalType); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case DroolsPackage.IMPORT_TYPE: { |
| ImportType importType = (ImportType)theEObject; |
| T result = caseImportType(importType); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case DroolsPackage.META_DATA_TYPE: { |
| MetaDataType metaDataType = (MetaDataType)theEObject; |
| T result = caseMetaDataType(metaDataType); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case DroolsPackage.META_VALUE_TYPE: { |
| MetaValueType metaValueType = (MetaValueType)theEObject; |
| T result = caseMetaValueType(metaValueType); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case DroolsPackage.ON_ENTRY_SCRIPT_TYPE: { |
| OnEntryScriptType onEntryScriptType = (OnEntryScriptType)theEObject; |
| T result = caseOnEntryScriptType(onEntryScriptType); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case DroolsPackage.ON_EXIT_SCRIPT_TYPE: { |
| OnExitScriptType onExitScriptType = (OnExitScriptType)theEObject; |
| T result = caseOnExitScriptType(onExitScriptType); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case DroolsPackage.BP_SIM_DATA_TYPE: { |
| BPSimDataType bpSimDataType = (BPSimDataType)theEObject; |
| T result = caseBPSimDataType(bpSimDataType); |
| if (result == null) result = caseBpsim_BPSimDataType(bpSimDataType); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case DroolsPackage.EXTERNAL_PROCESS: { |
| ExternalProcess externalProcess = (ExternalProcess)theEObject; |
| T result = caseExternalProcess(externalProcess); |
| if (result == null) result = caseCallableElement(externalProcess); |
| if (result == null) result = caseRootElement(externalProcess); |
| if (result == null) result = caseBaseElement(externalProcess); |
| 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>Global Type</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>Global Type</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseGlobalType(GlobalType object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Import Type</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>Import Type</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseImportType(ImportType object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Meta Data Type</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>Meta Data Type</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseMetaDataType(MetaDataType object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Meta Value Type</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>Meta Value Type</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseMetaValueType(MetaValueType object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>On Entry Script Type</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>On Entry Script Type</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseOnEntryScriptType(OnEntryScriptType object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>On Exit Script Type</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>On Exit Script Type</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseOnExitScriptType(OnExitScriptType object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>BP Sim Data Type</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>BP Sim Data Type</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseBPSimDataType(BPSimDataType object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>External Process</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>External Process</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseExternalProcess(ExternalProcess object) { |
| return null; |
| } |
| |
| /** |
| * 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 caseBpmn2_DocumentRoot(org.eclipse.bpmn2.DocumentRoot 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>Item Aware 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>Item Aware Element</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseItemAwareElement(ItemAwareElement object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>BP Sim Data Type</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>BP Sim Data Type</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseBpsim_BPSimDataType(org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.bpsim.BPSimDataType 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>Callable 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>Callable Element</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseCallableElement(CallableElement 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; |
| } |
| |
| } //DroolsSwitch |