/** */ package hu.bme.mit.inf.dslreasoner.faulttree.model.ft.util; import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.*; 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.ft.FtPackage * @generated */ public class FtSwitch extends Switch { /** * The cached model package * * * @generated */ protected static FtPackage modelPackage; /** * Creates an instance of the switch. * * * @generated */ public FtSwitch() { if (modelPackage == null) { modelPackage = FtPackage.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 FtPackage.FAULT_TREE: { FaultTree faultTree = (FaultTree)theEObject; T result = caseFaultTree(faultTree); if (result == null) result = defaultCase(theEObject); return result; } case FtPackage.EVENT: { Event event = (Event)theEObject; T result = caseEvent(event); if (result == null) result = defaultCase(theEObject); return result; } case FtPackage.BASIC_EVENT: { BasicEvent basicEvent = (BasicEvent)theEObject; T result = caseBasicEvent(basicEvent); if (result == null) result = caseEvent(basicEvent); if (result == null) result = defaultCase(theEObject); return result; } case FtPackage.GATE: { Gate gate = (Gate)theEObject; T result = caseGate(gate); if (result == null) result = caseEvent(gate); if (result == null) result = defaultCase(theEObject); return result; } case FtPackage.DISTRIBUTION: { Distribution distribution = (Distribution)theEObject; T result = caseDistribution(distribution); if (result == null) result = defaultCase(theEObject); return result; } case FtPackage.CONSTANT_DISTRIBUTION: { ConstantDistribution constantDistribution = (ConstantDistribution)theEObject; T result = caseConstantDistribution(constantDistribution); if (result == null) result = caseDistribution(constantDistribution); if (result == null) result = defaultCase(theEObject); return result; } case FtPackage.EXPONENTIAL_DISTRIBUTION: { ExponentialDistribution exponentialDistribution = (ExponentialDistribution)theEObject; T result = caseExponentialDistribution(exponentialDistribution); if (result == null) result = caseDistribution(exponentialDistribution); if (result == null) result = defaultCase(theEObject); return result; } case FtPackage.AND_GATE: { AndGate andGate = (AndGate)theEObject; T result = caseAndGate(andGate); if (result == null) result = caseGate(andGate); if (result == null) result = caseEvent(andGate); if (result == null) result = defaultCase(theEObject); return result; } case FtPackage.OR_GATE: { OrGate orGate = (OrGate)theEObject; T result = caseOrGate(orGate); if (result == null) result = caseGate(orGate); if (result == null) result = caseEvent(orGate); if (result == null) result = defaultCase(theEObject); return result; } case FtPackage.KOF_MGATE: { KOfMGate kOfMGate = (KOfMGate)theEObject; T result = caseKOfMGate(kOfMGate); if (result == null) result = caseGate(kOfMGate); if (result == null) result = caseEvent(kOfMGate); if (result == null) result = defaultCase(theEObject); return result; } default: return defaultCase(theEObject); } } /** * Returns the result of interpreting the object as an instance of '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 'Fault Tree'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseFaultTree(FaultTree object) { return null; } /** * Returns the result of interpreting the object as an instance of '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 'Event'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseEvent(Event object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Basic 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 'Basic Event'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseBasicEvent(BasicEvent object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Gate'. * * 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'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseGate(Gate object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Distribution'. * * 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 'Distribution'. * @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 'Constant Distribution'. * * 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 'Constant Distribution'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseConstantDistribution(ConstantDistribution object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Exponential Distribution'. * * 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 'Exponential Distribution'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseExponentialDistribution(ExponentialDistribution object) { return null; } /** * Returns the result of interpreting the object as an instance of 'And Gate'. * * 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'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseAndGate(AndGate object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Or Gate'. * * 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'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseOrGate(OrGate object) { return null; } /** * Returns the result of interpreting the object as an instance of 'KOf MGate'. * * 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'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseKOfMGate(KOfMGate 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; } } //FtSwitch