blob: be07cc6018a1fd8cbb0f212f61839bdc80d203fd [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 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:
* Joerg Riegel - Initial implementation
*
*/
package org.eclipse.osbp.xtext.chart.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.chart.*;
/**
* <!-- 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.chart.ChartDSLPackage
* @generated
*/
public class ChartDSLSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static ChartDSLPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ChartDSLSwitch() {
if (modelPackage == null) {
modelPackage = ChartDSLPackage.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 ChartDSLPackage.CHART_MODEL: {
ChartModel chartModel = (ChartModel)theEObject;
T result = caseChartModel(chartModel);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_LAZY_RESOLVER: {
ChartLazyResolver chartLazyResolver = (ChartLazyResolver)theEObject;
T result = caseChartLazyResolver(chartLazyResolver);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_BASE: {
ChartBase chartBase = (ChartBase)theEObject;
T result = caseChartBase(chartBase);
if (result == null) result = caseChartLazyResolver(chartBase);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_PACKAGE: {
ChartPackage chartPackage = (ChartPackage)theEObject;
T result = caseChartPackage(chartPackage);
if (result == null) result = caseLPackage(chartPackage);
if (result == null) result = caseLLazyResolver(chartPackage);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART: {
Chart chart = (Chart)theEObject;
T result = caseChart(chart);
if (result == null) result = caseChartBase(chart);
if (result == null) result = caseChartLazyResolver(chart);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_OPTION: {
ChartOption chartOption = (ChartOption)theEObject;
T result = caseChartOption(chartOption);
if (result == null) result = caseChartLazyResolver(chartOption);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_BAR: {
ChartBar chartBar = (ChartBar)theEObject;
T result = caseChartBar(chartBar);
if (result == null) result = caseChartOption(chartBar);
if (result == null) result = caseChartLazyResolver(chartBar);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_LINE: {
ChartLine chartLine = (ChartLine)theEObject;
T result = caseChartLine(chartLine);
if (result == null) result = caseChartOption(chartLine);
if (result == null) result = caseChartLazyResolver(chartLine);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_PIE: {
ChartPie chartPie = (ChartPie)theEObject;
T result = caseChartPie(chartPie);
if (result == null) result = caseChartOption(chartPie);
if (result == null) result = caseChartLazyResolver(chartPie);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_DONUT: {
ChartDonut chartDonut = (ChartDonut)theEObject;
T result = caseChartDonut(chartDonut);
if (result == null) result = caseChartOption(chartDonut);
if (result == null) result = caseChartLazyResolver(chartDonut);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_BUBBLE: {
ChartBubble chartBubble = (ChartBubble)theEObject;
T result = caseChartBubble(chartBubble);
if (result == null) result = caseChartOption(chartBubble);
if (result == null) result = caseChartLazyResolver(chartBubble);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_GAUGE: {
ChartGauge chartGauge = (ChartGauge)theEObject;
T result = caseChartGauge(chartGauge);
if (result == null) result = caseChartOption(chartGauge);
if (result == null) result = caseChartLazyResolver(chartGauge);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_TREE: {
ChartTree chartTree = (ChartTree)theEObject;
T result = caseChartTree(chartTree);
if (result == null) result = caseChartOption(chartTree);
if (result == null) result = caseChartLazyResolver(chartTree);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_INTERVAL: {
ChartInterval chartInterval = (ChartInterval)theEObject;
T result = caseChartInterval(chartInterval);
if (result == null) result = caseChartLazyResolver(chartInterval);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_NUMBER_INTERVAL: {
ChartNumberInterval chartNumberInterval = (ChartNumberInterval)theEObject;
T result = caseChartNumberInterval(chartNumberInterval);
if (result == null) result = caseChartInterval(chartNumberInterval);
if (result == null) result = caseChartLazyResolver(chartNumberInterval);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_DATAMART: {
ChartDatamart chartDatamart = (ChartDatamart)theEObject;
T result = caseChartDatamart(chartDatamart);
if (result == null) result = caseChartLazyResolver(chartDatamart);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_ELEMENT: {
ChartElement chartElement = (ChartElement)theEObject;
T result = caseChartElement(chartElement);
if (result == null) result = caseChartLazyResolver(chartElement);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_LEGEND: {
ChartLegend chartLegend = (ChartLegend)theEObject;
T result = caseChartLegend(chartLegend);
if (result == null) result = caseChartElement(chartLegend);
if (result == null) result = caseChartLazyResolver(chartLegend);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_HIGHLIGHTER: {
ChartHighlighter chartHighlighter = (ChartHighlighter)theEObject;
T result = caseChartHighlighter(chartHighlighter);
if (result == null) result = caseChartElement(chartHighlighter);
if (result == null) result = caseChartLazyResolver(chartHighlighter);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_AXIS: {
ChartAxis chartAxis = (ChartAxis)theEObject;
T result = caseChartAxis(chartAxis);
if (result == null) result = caseChartElement(chartAxis);
if (result == null) result = caseChartLazyResolver(chartAxis);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_RANGE_ELEMENT: {
ChartRangeElement chartRangeElement = (ChartRangeElement)theEObject;
T result = caseChartRangeElement(chartRangeElement);
if (result == null) result = caseChartLazyResolver(chartRangeElement);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ChartDSLPackage.CHART_SEGMENT_COLOR: {
ChartSegmentColor chartSegmentColor = (ChartSegmentColor)theEObject;
T result = caseChartSegmentColor(chartSegmentColor);
if (result == null) result = caseChartRangeElement(chartSegmentColor);
if (result == null) result = caseChartLazyResolver(chartSegmentColor);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart 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>Chart Model</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartModel(ChartModel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart 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>Chart Lazy Resolver</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartLazyResolver(ChartLazyResolver object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart 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>Chart Base</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartBase(ChartBase object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart 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>Chart Package</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartPackage(ChartPackage object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>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>Chart</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChart(Chart object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Option</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>Chart Option</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartOption(ChartOption object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Bar</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>Chart Bar</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartBar(ChartBar object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Line</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>Chart Line</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartLine(ChartLine object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Pie</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>Chart Pie</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartPie(ChartPie object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Donut</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>Chart Donut</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartDonut(ChartDonut object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Bubble</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>Chart Bubble</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartBubble(ChartBubble object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Gauge</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>Chart Gauge</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartGauge(ChartGauge object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Tree</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>Chart Tree</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartTree(ChartTree object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Interval</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>Chart Interval</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartInterval(ChartInterval object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Number Interval</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>Chart Number Interval</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartNumberInterval(ChartNumberInterval object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Datamart</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>Chart Datamart</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartDatamart(ChartDatamart object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart 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>Chart Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartElement(ChartElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Legend</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>Chart Legend</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartLegend(ChartLegend object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Highlighter</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>Chart Highlighter</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartHighlighter(ChartHighlighter object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Axis</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>Chart Axis</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartAxis(ChartAxis object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Range 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>Chart Range Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartRangeElement(ChartRangeElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Chart Segment Color</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>Chart Segment Color</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseChartSegmentColor(ChartSegmentColor 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;
}
} //ChartDSLSwitch