| /** |
| * 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 v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Based on ideas from Xtext, Xtend, Xcore |
| * |
| * Contributors: |
| * Christophe Loetz - Initial implementation |
| * |
| */ |
| package org.eclipse.osbp.xtext.functionlibrarydsl.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.functionlibrarydsl.*; |
| |
| /** |
| * <!-- 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.functionlibrarydsl.FunctionLibraryDSLPackage |
| * @generated |
| */ |
| public class FunctionLibraryDSLSwitch<T> extends Switch<T> { |
| /** |
| * The cached model package |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected static FunctionLibraryDSLPackage modelPackage; |
| |
| /** |
| * Creates an instance of the switch. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public FunctionLibraryDSLSwitch() { |
| if (modelPackage == null) { |
| modelPackage = FunctionLibraryDSLPackage.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 FunctionLibraryDSLPackage.FUNCTION_LIBRARY_MODEL: { |
| FunctionLibraryModel functionLibraryModel = (FunctionLibraryModel)theEObject; |
| T result = caseFunctionLibraryModel(functionLibraryModel); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_PACKAGE: { |
| FunctionLibraryPackage functionLibraryPackage = (FunctionLibraryPackage)theEObject; |
| T result = caseFunctionLibraryPackage(functionLibraryPackage); |
| if (result == null) result = caseLPackage(functionLibraryPackage); |
| if (result == null) result = caseLLazyResolver(functionLibraryPackage); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_GROUP: { |
| FunctionLibraryGroup functionLibraryGroup = (FunctionLibraryGroup)theEObject; |
| T result = caseFunctionLibraryGroup(functionLibraryGroup); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_BLIP_GROUP: { |
| FunctionLibraryBlipGroup functionLibraryBlipGroup = (FunctionLibraryBlipGroup)theEObject; |
| T result = caseFunctionLibraryBlipGroup(functionLibraryBlipGroup); |
| if (result == null) result = caseFunctionLibraryGroup(functionLibraryBlipGroup); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_STATEMACHINE_GROUP: { |
| FunctionLibraryStatemachineGroup functionLibraryStatemachineGroup = (FunctionLibraryStatemachineGroup)theEObject; |
| T result = caseFunctionLibraryStatemachineGroup(functionLibraryStatemachineGroup); |
| if (result == null) result = caseFunctionLibraryGroup(functionLibraryStatemachineGroup); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_CONVERTER_GROUP: { |
| FunctionLibraryConverterGroup functionLibraryConverterGroup = (FunctionLibraryConverterGroup)theEObject; |
| T result = caseFunctionLibraryConverterGroup(functionLibraryConverterGroup); |
| if (result == null) result = caseFunctionLibraryGroup(functionLibraryConverterGroup); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_RATING: { |
| FunctionLibraryRating functionLibraryRating = (FunctionLibraryRating)theEObject; |
| T result = caseFunctionLibraryRating(functionLibraryRating); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_RATING_ITEM: { |
| FunctionLibraryRatingItem functionLibraryRatingItem = (FunctionLibraryRatingItem)theEObject; |
| T result = caseFunctionLibraryRatingItem(functionLibraryRatingItem); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_BASE_FUNCTION: { |
| FunctionLibraryBaseFunction functionLibraryBaseFunction = (FunctionLibraryBaseFunction)theEObject; |
| T result = caseFunctionLibraryBaseFunction(functionLibraryBaseFunction); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_FUNCTION: { |
| FunctionLibraryFunction functionLibraryFunction = (FunctionLibraryFunction)theEObject; |
| T result = caseFunctionLibraryFunction(functionLibraryFunction); |
| if (result == null) result = caseFunctionLibraryBaseFunction(functionLibraryFunction); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_TEST: { |
| FunctionLibraryTest functionLibraryTest = (FunctionLibraryTest)theEObject; |
| T result = caseFunctionLibraryTest(functionLibraryTest); |
| if (result == null) result = caseFunctionLibraryBaseFunction(functionLibraryTest); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_RATE: { |
| FunctionLibraryRate functionLibraryRate = (FunctionLibraryRate)theEObject; |
| T result = caseFunctionLibraryRate(functionLibraryRate); |
| if (result == null) result = caseFunctionLibraryBaseFunction(functionLibraryRate); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_GUARD: { |
| FunctionLibraryGuard functionLibraryGuard = (FunctionLibraryGuard)theEObject; |
| T result = caseFunctionLibraryGuard(functionLibraryGuard); |
| if (result == null) result = caseFunctionLibraryBaseFunction(functionLibraryGuard); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_OPERATION: { |
| FunctionLibraryOperation functionLibraryOperation = (FunctionLibraryOperation)theEObject; |
| T result = caseFunctionLibraryOperation(functionLibraryOperation); |
| if (result == null) result = caseFunctionLibraryBaseFunction(functionLibraryOperation); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_CONVERT_TO_MODEL: { |
| FunctionConvertToModel functionConvertToModel = (FunctionConvertToModel)theEObject; |
| T result = caseFunctionConvertToModel(functionConvertToModel); |
| if (result == null) result = caseFunctionLibraryBaseFunction(functionConvertToModel); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_CONVERT_TO_PRESENTATION: { |
| FunctionConvertToPresentation functionConvertToPresentation = (FunctionConvertToPresentation)theEObject; |
| T result = caseFunctionConvertToPresentation(functionConvertToPresentation); |
| if (result == null) result = caseFunctionLibraryBaseFunction(functionConvertToPresentation); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case FunctionLibraryDSLPackage.FUNCTION_LIBRARY_PARAMETER: { |
| FunctionLibraryParameter functionLibraryParameter = (FunctionLibraryParameter)theEObject; |
| T result = caseFunctionLibraryParameter(functionLibraryParameter); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| default: return defaultCase(theEObject); |
| } |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library 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>Function Library Model</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryModel(FunctionLibraryModel object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library 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>Function Library Package</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryPackage(FunctionLibraryPackage object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library Group</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>Function Library Group</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryGroup(FunctionLibraryGroup object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library Blip Group</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>Function Library Blip Group</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryBlipGroup(FunctionLibraryBlipGroup object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library Statemachine Group</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>Function Library Statemachine Group</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryStatemachineGroup(FunctionLibraryStatemachineGroup object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library Converter Group</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>Function Library Converter Group</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryConverterGroup(FunctionLibraryConverterGroup object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library Rating</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>Function Library Rating</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryRating(FunctionLibraryRating object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library Rating 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>Function Library Rating Item</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryRatingItem(FunctionLibraryRatingItem object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library Base 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>Function Library Base Function</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryBaseFunction(FunctionLibraryBaseFunction object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library 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>Function Library Function</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryFunction(FunctionLibraryFunction object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library Test</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>Function Library Test</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryTest(FunctionLibraryTest object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library Rate</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>Function Library Rate</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryRate(FunctionLibraryRate object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library Guard</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>Function Library Guard</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryGuard(FunctionLibraryGuard object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library Operation</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>Function Library Operation</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryOperation(FunctionLibraryOperation object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Convert To 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>Function Convert To Model</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionConvertToModel(FunctionConvertToModel object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Convert To Presentation</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>Function Convert To Presentation</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionConvertToPresentation(FunctionConvertToPresentation object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Function Library 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>Function Library Parameter</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T caseFunctionLibraryParameter(FunctionLibraryParameter 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; |
| } |
| |
| } //FunctionLibraryDSLSwitch |