blob: a50fc114c99a58c7e94349c5ececafb7080f1242 [file] [log] [blame]
/**
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
* generated from ActionDSL.xcore
*
*
*/
package org.eclipse.osbp.xtext.action.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import org.eclipse.osbp.dsl.semantic.common.types.LLazyResolver;
import org.eclipse.osbp.dsl.semantic.common.types.LPackage;
import org.eclipse.osbp.xtext.action.*;
/**
* <!-- 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.osbp.xtext.action.ActionDSLPackage
* @generated
*/
public class ActionDSLSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static ActionDSLPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ActionDSLSwitch() {
if (modelPackage == null) {
modelPackage = ActionDSLPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param 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 ActionDSLPackage.ACTION_MODEL: {
ActionModel actionModel = (ActionModel)theEObject;
T result = caseActionModel(actionModel);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_LAZY_RESOLVER: {
ActionLazyResolver actionLazyResolver = (ActionLazyResolver)theEObject;
T result = caseActionLazyResolver(actionLazyResolver);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_PACKAGE: {
ActionPackage actionPackage = (ActionPackage)theEObject;
T result = caseActionPackage(actionPackage);
if (result == null) result = caseLPackage(actionPackage);
if (result == null) result = caseLLazyResolver(actionPackage);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_BASE: {
ActionBase actionBase = (ActionBase)theEObject;
T result = caseActionBase(actionBase);
if (result == null) result = caseActionLazyResolver(actionBase);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_COMMAND: {
ActionCommand actionCommand = (ActionCommand)theEObject;
T result = caseActionCommand(actionCommand);
if (result == null) result = caseActionBase(actionCommand);
if (result == null) result = caseActionLazyResolver(actionCommand);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_TOOLBAR: {
ActionToolbar actionToolbar = (ActionToolbar)theEObject;
T result = caseActionToolbar(actionToolbar);
if (result == null) result = caseActionBase(actionToolbar);
if (result == null) result = caseActionLazyResolver(actionToolbar);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_TOOLBAR_ITEM: {
ActionToolbarItem actionToolbarItem = (ActionToolbarItem)theEObject;
T result = caseActionToolbarItem(actionToolbarItem);
if (result == null) result = caseActionBase(actionToolbarItem);
if (result == null) result = caseActionLazyResolver(actionToolbarItem);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_BUTTON: {
ActionButton actionButton = (ActionButton)theEObject;
T result = caseActionButton(actionButton);
if (result == null) result = caseActionToolbarItem(actionButton);
if (result == null) result = caseActionBase(actionButton);
if (result == null) result = caseActionLazyResolver(actionButton);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_SPACER: {
ActionSpacer actionSpacer = (ActionSpacer)theEObject;
T result = caseActionSpacer(actionSpacer);
if (result == null) result = caseActionToolbarItem(actionSpacer);
if (result == null) result = caseActionBase(actionSpacer);
if (result == null) result = caseActionLazyResolver(actionSpacer);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_TYPE: {
ActionType actionType = (ActionType)theEObject;
T result = caseActionType(actionType);
if (result == null) result = caseActionLazyResolver(actionType);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_TASK: {
ActionTask actionTask = (ActionTask)theEObject;
T result = caseActionTask(actionTask);
if (result == null) result = caseActionType(actionTask);
if (result == null) result = caseActionLazyResolver(actionTask);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_SELECT_WORKLOAD: {
ActionSelectWorkload actionSelectWorkload = (ActionSelectWorkload)theEObject;
T result = caseActionSelectWorkload(actionSelectWorkload);
if (result == null) result = caseActionType(actionSelectWorkload);
if (result == null) result = caseActionLazyResolver(actionSelectWorkload);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_DIALOG: {
ActionDialog actionDialog = (ActionDialog)theEObject;
T result = caseActionDialog(actionDialog);
if (result == null) result = caseActionType(actionDialog);
if (result == null) result = caseActionLazyResolver(actionDialog);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_REPORT: {
ActionReport actionReport = (ActionReport)theEObject;
T result = caseActionReport(actionReport);
if (result == null) result = caseActionType(actionReport);
if (result == null) result = caseActionLazyResolver(actionReport);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_CHART: {
ActionChart actionChart = (ActionChart)theEObject;
T result = caseActionChart(actionChart);
if (result == null) result = caseActionType(actionChart);
if (result == null) result = caseActionLazyResolver(actionChart);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_WORKFLOW: {
ActionWorkflow actionWorkflow = (ActionWorkflow)theEObject;
T result = caseActionWorkflow(actionWorkflow);
if (result == null) result = caseActionType(actionWorkflow);
if (result == null) result = caseActionLazyResolver(actionWorkflow);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_DATAINTERCHANGE: {
ActionDatainterchange actionDatainterchange = (ActionDatainterchange)theEObject;
T result = caseActionDatainterchange(actionDatainterchange);
if (result == null) result = caseActionType(actionDatainterchange);
if (result == null) result = caseActionLazyResolver(actionDatainterchange);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_UI: {
ActionUI actionUI = (ActionUI)theEObject;
T result = caseActionUI(actionUI);
if (result == null) result = caseActionType(actionUI);
if (result == null) result = caseActionLazyResolver(actionUI);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_FUNCTION: {
ActionFunction actionFunction = (ActionFunction)theEObject;
T result = caseActionFunction(actionFunction);
if (result == null) result = caseActionType(actionFunction);
if (result == null) result = caseActionLazyResolver(actionFunction);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ActionDSLPackage.ACTION_PARAMETER: {
ActionParameter actionParameter = (ActionParameter)theEObject;
T result = caseActionParameter(actionParameter);
if (result == null) result = caseActionBase(actionParameter);
if (result == null) result = caseActionLazyResolver(actionParameter);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Model</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>Action Model</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionModel(ActionModel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Lazy Resolver</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>Action Lazy Resolver</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionLazyResolver(ActionLazyResolver object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Package</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>Action Package</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionPackage(ActionPackage object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Base</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>Action Base</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionBase(ActionBase object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Command</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>Action Command</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionCommand(ActionCommand object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Toolbar</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>Action Toolbar</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionToolbar(ActionToolbar object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Toolbar Item</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>Action Toolbar Item</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionToolbarItem(ActionToolbarItem object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Button</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>Action Button</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionButton(ActionButton object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Spacer</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>Action Spacer</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionSpacer(ActionSpacer object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action 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>Action Type</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionType(ActionType object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Task</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>Action Task</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionTask(ActionTask object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Select Workload</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>Action Select Workload</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionSelectWorkload(ActionSelectWorkload object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Dialog</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>Action Dialog</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionDialog(ActionDialog object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Report</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>Action Report</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionReport(ActionReport object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Chart</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>Action Chart</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionChart(ActionChart object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Workflow</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>Action Workflow</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionWorkflow(ActionWorkflow object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Datainterchange</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>Action Datainterchange</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionDatainterchange(ActionDatainterchange object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action UI</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>Action UI</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionUI(ActionUI object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action Function</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>Action Function</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionFunction(ActionFunction object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Action 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>Action Parameter</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActionParameter(ActionParameter object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>LLazy Resolver</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>LLazy Resolver</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLLazyResolver(LLazyResolver object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>LPackage</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>LPackage</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLPackage(LPackage 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;
}
} //ActionDSLSwitch