blob: ea92389128d64aaf96006e4b5faf8622302db0a7 [file] [log] [blame]
/**
* *******************************************************************************
* Copyright (c) 2017 Timing-Architects Embedded Systems GmbH and others.
* 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
*
* Generated using Eclipse EMF
*
* *******************************************************************************
*/
package org.eclipse.app4mc.amalthea.generator.configuration.util;
import org.eclipse.app4mc.amalthea.generator.configuration.*;
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.app4mc.amalthea.generator.configuration.RTMGCPackage
* @generated
*/
public class RTMGCSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static RTMGCPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public RTMGCSwitch() {
if (modelPackage == null) {
modelPackage = RTMGCPackage.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 RTMGCPackage.RTMGC: {
RTMGC rtmgc = (RTMGC)theEObject;
T result = caseRTMGC(rtmgc);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.GENERATION: {
Generation generation = (Generation)theEObject;
T result = caseGeneration(generation);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.ACTIVATION_PROPERTIES: {
ActivationProperties activationProperties = (ActivationProperties)theEObject;
T result = caseActivationProperties(activationProperties);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.ACTIVATION: {
Activation activation = (Activation)theEObject;
T result = caseActivation(activation);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.PERIODIC_ACTIVATION: {
PeriodicActivation periodicActivation = (PeriodicActivation)theEObject;
T result = casePeriodicActivation(periodicActivation);
if (result == null) result = caseActivation(periodicActivation);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.PERIODIC_TRIANGLE_SHIFT: {
PeriodicTriangleShift periodicTriangleShift = (PeriodicTriangleShift)theEObject;
T result = casePeriodicTriangleShift(periodicTriangleShift);
if (result == null) result = casePeriodicActivation(periodicTriangleShift);
if (result == null) result = caseActivation(periodicTriangleShift);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.TRIANGLE_CLOCK: {
TriangleClock triangleClock = (TriangleClock)theEObject;
T result = caseTriangleClock(triangleClock);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.SPORADIC_ACTIVATION: {
SporadicActivation sporadicActivation = (SporadicActivation)theEObject;
T result = caseSporadicActivation(sporadicActivation);
if (result == null) result = caseActivation(sporadicActivation);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.RECURRENCE: {
Recurrence recurrence = (Recurrence)theEObject;
T result = caseRecurrence(recurrence);
if (result == null) result = caseIntegerTimeDistribution(recurrence);
if (result == null) result = caseIntegerDistribution(recurrence);
if (result == null) result = caseDistribution(recurrence);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.LABEL_PROPERTIES: {
LabelProperties labelProperties = (LabelProperties)theEObject;
T result = caseLabelProperties(labelProperties);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.RUNNABLE_PROPERTIES: {
RunnableProperties runnableProperties = (RunnableProperties)theEObject;
T result = caseRunnableProperties(runnableProperties);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.SEMAPHORE_PROPERTIES: {
SemaphoreProperties semaphoreProperties = (SemaphoreProperties)theEObject;
T result = caseSemaphoreProperties(semaphoreProperties);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.SEMAPHORE_ACCESS_PROPERTIES: {
SemaphoreAccessProperties semaphoreAccessProperties = (SemaphoreAccessProperties)theEObject;
T result = caseSemaphoreAccessProperties(semaphoreAccessProperties);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.TASK_PROPERTIES: {
TaskProperties taskProperties = (TaskProperties)theEObject;
T result = caseTaskProperties(taskProperties);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.CALL_GRAPH_PROPERTIES: {
CallGraphProperties callGraphProperties = (CallGraphProperties)theEObject;
T result = caseCallGraphProperties(callGraphProperties);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.DISTRIBUTION: {
Distribution distribution = (Distribution)theEObject;
T result = caseDistribution(distribution);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.INTEGER_DISTRIBUTION: {
IntegerDistribution integerDistribution = (IntegerDistribution)theEObject;
T result = caseIntegerDistribution(integerDistribution);
if (result == null) result = caseDistribution(integerDistribution);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.INTEGER_TIME_DISTRIBUTION: {
IntegerTimeDistribution integerTimeDistribution = (IntegerTimeDistribution)theEObject;
T result = caseIntegerTimeDistribution(integerTimeDistribution);
if (result == null) result = caseIntegerDistribution(integerTimeDistribution);
if (result == null) result = caseDistribution(integerTimeDistribution);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.PERCENTAGE_DISTRIBUTION: {
PercentageDistribution percentageDistribution = (PercentageDistribution)theEObject;
T result = casePercentageDistribution(percentageDistribution);
if (result == null) result = caseDistribution(percentageDistribution);
if (result == null) result = defaultCase(theEObject);
return result;
}
case RTMGCPackage.DOUBLE_DISTRIBUTION: {
DoubleDistribution doubleDistribution = (DoubleDistribution)theEObject;
T result = caseDoubleDistribution(doubleDistribution);
if (result == null) result = caseDistribution(doubleDistribution);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>RTMGC</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>RTMGC</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRTMGC(RTMGC object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Generation</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>Generation</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseGeneration(Generation object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Activation Properties</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>Activation Properties</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActivationProperties(ActivationProperties object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Activation</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>Activation</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseActivation(Activation object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Periodic Activation</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>Periodic Activation</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePeriodicActivation(PeriodicActivation object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Periodic Triangle Shift</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>Periodic Triangle Shift</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePeriodicTriangleShift(PeriodicTriangleShift object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Triangle Clock</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>Triangle Clock</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseTriangleClock(TriangleClock object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Sporadic Activation</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>Sporadic Activation</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseSporadicActivation(SporadicActivation object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Recurrence</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>Recurrence</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRecurrence(Recurrence object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Label Properties</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>Label Properties</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLabelProperties(LabelProperties object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Runnable Properties</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>Runnable Properties</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseRunnableProperties(RunnableProperties object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Semaphore Properties</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>Semaphore Properties</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseSemaphoreProperties(SemaphoreProperties object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Semaphore Access Properties</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>Semaphore Access Properties</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseSemaphoreAccessProperties(SemaphoreAccessProperties object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Task Properties</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>Task Properties</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseTaskProperties(TaskProperties object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Call Graph Properties</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>Call Graph Properties</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCallGraphProperties(CallGraphProperties object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Distribution</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>Distribution</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDistribution(Distribution object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Integer Distribution</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>Integer Distribution</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseIntegerDistribution(IntegerDistribution object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Integer Time Distribution</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>Integer Time Distribution</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseIntegerTimeDistribution(IntegerTimeDistribution object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Percentage Distribution</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>Percentage Distribution</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePercentageDistribution(PercentageDistribution object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Double Distribution</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>Double Distribution</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseDoubleDistribution(DoubleDistribution 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;
}
} //RTMGCSwitch