/**
*/
package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.util;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.*;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
/**
*
* The Switch for the model's inheritance hierarchy.
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
* to invoke the caseXXX
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.
*
* @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage
* @generated
*/
public class CftSwitch extends Switch {
/**
* The cached model package
*
*
* @generated
*/
protected static CftPackage modelPackage;
/**
* Creates an instance of the switch.
*
*
* @generated
*/
public CftSwitch() {
if (modelPackage == null) {
modelPackage = CftPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package.
*
*
* @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 caseXXX
for each class of the model until one returns a non null result; it yields that result.
*
*
* @return the first non-null result returned by a caseXXX
call.
* @generated
*/
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case CftPackage.COMPONENT_DEFINITION: {
ComponentDefinition componentDefinition = (ComponentDefinition)theEObject;
T result = caseComponentDefinition(componentDefinition);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CftPackage.EVENT_DEFINITION: {
EventDefinition eventDefinition = (EventDefinition)theEObject;
T result = caseEventDefinition(eventDefinition);
if (result == null) result = caseEventDeclaration(eventDefinition);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CftPackage.GATE_DEFINITION: {
GateDefinition gateDefinition = (GateDefinition)theEObject;
T result = caseGateDefinition(gateDefinition);
if (result == null) result = caseEventDefinition(gateDefinition);
if (result == null) result = caseEventDeclaration(gateDefinition);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CftPackage.BASIC_EVENT_DEFINITION: {
BasicEventDefinition basicEventDefinition = (BasicEventDefinition)theEObject;
T result = caseBasicEventDefinition(basicEventDefinition);
if (result == null) result = caseEventDefinition(basicEventDefinition);
if (result == null) result = caseEventDeclaration(basicEventDefinition);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CftPackage.INPUT_EVENT: {
InputEvent inputEvent = (InputEvent)theEObject;
T result = caseInputEvent(inputEvent);
if (result == null) result = caseEventDeclaration(inputEvent);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CftPackage.EVENT_DECLARATION: {
EventDeclaration eventDeclaration = (EventDeclaration)theEObject;
T result = caseEventDeclaration(eventDeclaration);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CftPackage.AND_GATE_DEFINITION: {
AndGateDefinition andGateDefinition = (AndGateDefinition)theEObject;
T result = caseAndGateDefinition(andGateDefinition);
if (result == null) result = caseGateDefinition(andGateDefinition);
if (result == null) result = caseEventDefinition(andGateDefinition);
if (result == null) result = caseEventDeclaration(andGateDefinition);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CftPackage.OR_GATE_DEFINITION: {
OrGateDefinition orGateDefinition = (OrGateDefinition)theEObject;
T result = caseOrGateDefinition(orGateDefinition);
if (result == null) result = caseGateDefinition(orGateDefinition);
if (result == null) result = caseEventDefinition(orGateDefinition);
if (result == null) result = caseEventDeclaration(orGateDefinition);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CftPackage.KOF_MGATE_DEFINITION: {
KOfMGateDefinition kOfMGateDefinition = (KOfMGateDefinition)theEObject;
T result = caseKOfMGateDefinition(kOfMGateDefinition);
if (result == null) result = caseGateDefinition(kOfMGateDefinition);
if (result == null) result = caseEventDefinition(kOfMGateDefinition);
if (result == null) result = caseEventDeclaration(kOfMGateDefinition);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CftPackage.COMPONENT_FAULT_TREE: {
ComponentFaultTree componentFaultTree = (ComponentFaultTree)theEObject;
T result = caseComponentFaultTree(componentFaultTree);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CftPackage.COMPONENT: {
Component component = (Component)theEObject;
T result = caseComponent(component);
if (result == null) result = caseModalElement(component);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CftPackage.INPUT: {
Input input = (Input)theEObject;
T result = caseInput(input);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CftPackage.OUTPUT: {
Output output = (Output)theEObject;
T result = caseOutput(output);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CftPackage.CONNECTION: {
Connection connection = (Connection)theEObject;
T result = caseConnection(connection);
if (result == null) result = caseModalElement(connection);
if (result == null) result = defaultCase(theEObject);
return result;
}
case CftPackage.MODAL_ELEMENT: {
ModalElement modalElement = (ModalElement)theEObject;
T result = caseModalElement(modalElement);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of 'Component Definition'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Component Definition'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseComponentDefinition(ComponentDefinition object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Event Definition'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Event Definition'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseEventDefinition(EventDefinition object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Gate Definition'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Gate Definition'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseGateDefinition(GateDefinition object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Basic Event Definition'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Basic Event Definition'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseBasicEventDefinition(BasicEventDefinition object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Input Event'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Input Event'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseInputEvent(InputEvent object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Event Declaration'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Event Declaration'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseEventDeclaration(EventDeclaration object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'And Gate Definition'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'And Gate Definition'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAndGateDefinition(AndGateDefinition object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Or Gate Definition'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Or Gate Definition'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseOrGateDefinition(OrGateDefinition object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'KOf MGate Definition'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'KOf MGate Definition'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseKOfMGateDefinition(KOfMGateDefinition object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Component Fault Tree'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Component Fault Tree'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseComponentFaultTree(ComponentFaultTree object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Component'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Component'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseComponent(Component object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Input'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Input'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseInput(Input object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Output'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Output'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseOutput(Output object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Connection'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Connection'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseConnection(Connection object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'Modal Element'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'Modal Element'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseModalElement(ModalElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of 'EObject'.
*
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
*
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of 'EObject'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
@Override
public T defaultCase(EObject object) {
return null;
}
} //CftSwitch