blob: b407965a9c8304b408a35c54045da76314297903 [file] [log] [blame]
/**
* Copyright (c) 2014, Loetz GmbH&Co.KG (Heidelberg)
* 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 (Loetz GmbH&Co.KG) - Initial implementation
*
*/
package org.eclipse.osbp.xtext.datainterchange.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.datainterchange.*;
/**
* <!-- 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.datainterchange.DataDSLPackage
* @generated
*/
public class DataDSLSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static DataDSLPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DataDSLSwitch() {
if (modelPackage == null) {
modelPackage = DataDSLPackage.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 DataDSLPackage.DATA_INTERCHANGE_MODEL: {
DataInterchangeModel dataInterchangeModel = (DataInterchangeModel)theEObject;
T result = caseDataInterchangeModel(dataInterchangeModel);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_LAZY_RESOLVER: {
DataInterchangeLazyResolver dataInterchangeLazyResolver = (DataInterchangeLazyResolver)theEObject;
T result = caseDataInterchangeLazyResolver(dataInterchangeLazyResolver);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_PACKAGE: {
DataInterchangePackage dataInterchangePackage = (DataInterchangePackage)theEObject;
T result = caseDataInterchangePackage(dataInterchangePackage);
if (result == null) result = caseLPackage(dataInterchangePackage);
if (result == null) result = caseLLazyResolver(dataInterchangePackage);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_BASE: {
DataInterchangeBase dataInterchangeBase = (DataInterchangeBase)theEObject;
T result = caseDataInterchangeBase(dataInterchangeBase);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchangeBase);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE: {
DataInterchange dataInterchange = (DataInterchange)theEObject;
T result = caseDataInterchange(dataInterchange);
if (result == null) result = caseDataInterchangeBase(dataInterchange);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchange);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_FILE: {
DataInterchangeFile dataInterchangeFile = (DataInterchangeFile)theEObject;
T result = caseDataInterchangeFile(dataInterchangeFile);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchangeFile);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_FILE_XML: {
DataInterchangeFileXML dataInterchangeFileXML = (DataInterchangeFileXML)theEObject;
T result = caseDataInterchangeFileXML(dataInterchangeFileXML);
if (result == null) result = caseDataInterchangeFile(dataInterchangeFileXML);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchangeFileXML);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_FILE_CSV: {
DataInterchangeFileCSV dataInterchangeFileCSV = (DataInterchangeFileCSV)theEObject;
T result = caseDataInterchangeFileCSV(dataInterchangeFileCSV);
if (result == null) result = caseDataInterchangeFile(dataInterchangeFileCSV);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchangeFileCSV);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_FILE_EDI: {
DataInterchangeFileEDI dataInterchangeFileEDI = (DataInterchangeFileEDI)theEObject;
T result = caseDataInterchangeFileEDI(dataInterchangeFileEDI);
if (result == null) result = caseDataInterchangeFile(dataInterchangeFileEDI);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchangeFileEDI);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_BEAN: {
DataInterchangeBean dataInterchangeBean = (DataInterchangeBean)theEObject;
T result = caseDataInterchangeBean(dataInterchangeBean);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchangeBean);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_FORMAT: {
DataInterchangeFormat dataInterchangeFormat = (DataInterchangeFormat)theEObject;
T result = caseDataInterchangeFormat(dataInterchangeFormat);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchangeFormat);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_EXPRESSION: {
DataInterchangeExpression dataInterchangeExpression = (DataInterchangeExpression)theEObject;
T result = caseDataInterchangeExpression(dataInterchangeExpression);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchangeExpression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_ENTITY_EXPRESSION: {
DataInterchangeEntityExpression dataInterchangeEntityExpression = (DataInterchangeEntityExpression)theEObject;
T result = caseDataInterchangeEntityExpression(dataInterchangeEntityExpression);
if (result == null) result = caseDataInterchangeExpression(dataInterchangeEntityExpression);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchangeEntityExpression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_PREDEFINED_EXPRESSION: {
DataInterchangePredefinedExpression dataInterchangePredefinedExpression = (DataInterchangePredefinedExpression)theEObject;
T result = caseDataInterchangePredefinedExpression(dataInterchangePredefinedExpression);
if (result == null) result = caseDataInterchangeExpression(dataInterchangePredefinedExpression);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchangePredefinedExpression);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_LOOKUP: {
DataInterchangeLookup dataInterchangeLookup = (DataInterchangeLookup)theEObject;
T result = caseDataInterchangeLookup(dataInterchangeLookup);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchangeLookup);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_MARKER_PATH: {
DataInterchangeMarkerPath dataInterchangeMarkerPath = (DataInterchangeMarkerPath)theEObject;
T result = caseDataInterchangeMarkerPath(dataInterchangeMarkerPath);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchangeMarkerPath);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_MARKER_ENTITY: {
DataInterchangeMarkerEntity dataInterchangeMarkerEntity = (DataInterchangeMarkerEntity)theEObject;
T result = caseDataInterchangeMarkerEntity(dataInterchangeMarkerEntity);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchangeMarkerEntity);
if (result == null) result = defaultCase(theEObject);
return result;
}
case DataDSLPackage.DATA_INTERCHANGE_MAPPING: {
DataInterchangeMapping dataInterchangeMapping = (DataInterchangeMapping)theEObject;
T result = caseDataInterchangeMapping(dataInterchangeMapping);
if (result == null) result = caseDataInterchangeLazyResolver(dataInterchangeMapping);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange 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>Data Interchange Model</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeModel(DataInterchangeModel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange 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>Data Interchange Lazy Resolver</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeLazyResolver(DataInterchangeLazyResolver object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange 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>Data Interchange Package</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangePackage(DataInterchangePackage object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange 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>Data Interchange Base</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeBase(DataInterchangeBase object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange</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>Data Interchange</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchange(DataInterchange object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange File</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>Data Interchange File</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeFile(DataInterchangeFile object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange File XML</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>Data Interchange File XML</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeFileXML(DataInterchangeFileXML object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange File CSV</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>Data Interchange File CSV</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeFileCSV(DataInterchangeFileCSV object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange File EDI</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>Data Interchange File EDI</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeFileEDI(DataInterchangeFileEDI object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange Bean</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>Data Interchange Bean</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeBean(DataInterchangeBean object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange Format</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>Data Interchange Format</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeFormat(DataInterchangeFormat object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange Expression</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>Data Interchange Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeExpression(DataInterchangeExpression object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange Entity Expression</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>Data Interchange Entity Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeEntityExpression(DataInterchangeEntityExpression object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange Predefined Expression</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>Data Interchange Predefined Expression</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangePredefinedExpression(DataInterchangePredefinedExpression object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange Lookup</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>Data Interchange Lookup</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeLookup(DataInterchangeLookup object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange Marker Path</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>Data Interchange Marker Path</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeMarkerPath(DataInterchangeMarkerPath object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange Marker Entity</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>Data Interchange Marker Entity</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeMarkerEntity(DataInterchangeMarkerEntity object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Data Interchange Mapping</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>Data Interchange Mapping</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDataInterchangeMapping(DataInterchangeMapping 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;
}
} //DataDSLSwitch