/**
*/
package de.urszeidler.shr5.scripting.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import de.urszeidler.eclipse.shr5.Beschreibbar;
import de.urszeidler.shr5.scripting.Handout;
import de.urszeidler.shr5.scripting.Placement;
import de.urszeidler.shr5.scripting.Script;
import de.urszeidler.shr5.scripting.ScriptHistory;
import de.urszeidler.shr5.scripting.ScriptingPackage;
import de.urszeidler.shr5.scripting.Scripts;
import de.urszeidler.shr5.scripting.Section;
import de.urszeidler.shr5.scripting.TimeFrame;
/**
* <!-- 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 de.urszeidler.shr5.scripting.ScriptingPackage
* @generated
*/
public class ScriptingSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static ScriptingPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ScriptingSwitch() {
if (modelPackage == null) {
modelPackage = ScriptingPackage.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 ScriptingPackage.SCRIPT: {
Script script = (Script)theEObject;
T result = caseScript(script);
if (result == null) result = caseBeschreibbar(script);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ScriptingPackage.PLACEMENT: {
Placement placement = (Placement)theEObject;
T result = casePlacement(placement);
if (result == null) result = caseBeschreibbar(placement);
if (result == null) result = caseTimeFrame(placement);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ScriptingPackage.TIME_FRAME: {
TimeFrame timeFrame = (TimeFrame)theEObject;
T result = caseTimeFrame(timeFrame);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ScriptingPackage.SCRIPT_HISTORY: {
ScriptHistory scriptHistory = (ScriptHistory)theEObject;
T result = caseScriptHistory(scriptHistory);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ScriptingPackage.SCRIPTS: {
Scripts scripts = (Scripts)theEObject;
T result = caseScripts(scripts);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ScriptingPackage.HANDOUT: {
Handout handout = (Handout)theEObject;
T result = caseHandout(handout);
if (result == null) result = caseBeschreibbar(handout);
if (result == null) result = defaultCase(theEObject);
return result;
}
case ScriptingPackage.SECTION: {
Section section = (Section)theEObject;
T result = caseSection(section);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Script</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>Script</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseScript(Script object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Placement</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>Placement</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePlacement(Placement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Time Frame</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>Time Frame</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseTimeFrame(TimeFrame object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Script History</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>Script History</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseScriptHistory(ScriptHistory object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Scripts</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>Scripts</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseScripts(Scripts object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Handout</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>Handout</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseHandout(Handout object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Section</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>Section</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseSection(Section object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Beschreibbar</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>Beschreibbar</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseBeschreibbar(Beschreibbar 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;
}
} //ScriptingSwitch