/** */ package fr.obeo.intent.specification.util; import fr.obeo.intent.specification.*; 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 fr.obeo.intent.specification.SpecificationPackage * @generated */ public class SpecificationSwitch<T> extends Switch<T> { /** * The cached model package * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected static SpecificationPackage modelPackage; /** * Creates an instance of the switch. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public SpecificationSwitch() { if (modelPackage == null) { modelPackage = SpecificationPackage.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 SpecificationPackage.SPECIFICATION: { Specification specification = (Specification)theEObject; T result = caseSpecification(specification); if (result == null) result = caseNamedElement(specification); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.FEATURE: { Feature feature = (Feature)theEObject; T result = caseFeature(feature); if (result == null) result = caseNamedElement(feature); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.ROLE: { Role role = (Role)theEObject; T result = caseRole(role); if (result == null) result = caseNamedElement(role); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.CAPABILITY: { Capability capability = (Capability)theEObject; T result = caseCapability(capability); if (result == null) result = caseNamedElement(capability); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.BENEFIT: { Benefit benefit = (Benefit)theEObject; T result = caseBenefit(benefit); if (result == null) result = caseNamedElement(benefit); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.STORY: { Story story = (Story)theEObject; T result = caseStory(story); if (result == null) result = caseNamedElement(story); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.SCENARIO: { Scenario scenario = (Scenario)theEObject; T result = caseScenario(scenario); if (result == null) result = caseNamedElement(scenario); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.CONTEXT: { Context context = (Context)theEObject; T result = caseContext(context); if (result == null) result = caseScenarioElement(context); if (result == null) result = caseNamedElement(context); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.ACTION: { Action action = (Action)theEObject; T result = caseAction(action); if (result == null) result = caseScenarioElement(action); if (result == null) result = caseNamedElement(action); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.BEHAVIOUR: { Behaviour behaviour = (Behaviour)theEObject; T result = caseBehaviour(behaviour); if (result == null) result = caseScenarioElement(behaviour); if (result == null) result = caseNamedElement(behaviour); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.AUTOMATION_LAYER: { AutomationLayer automationLayer = (AutomationLayer)theEObject; T result = caseAutomationLayer(automationLayer); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.NAMED_ELEMENT: { NamedElement namedElement = (NamedElement)theEObject; T result = caseNamedElement(namedElement); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.NOTE: { Note note = (Note)theEObject; T result = caseNote(note); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.IMPLEMENTATION_NOTE: { ImplementationNote implementationNote = (ImplementationNote)theEObject; T result = caseImplementationNote(implementationNote); if (result == null) result = caseNote(implementationNote); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.TEST_NOTE: { TestNote testNote = (TestNote)theEObject; T result = caseTestNote(testNote); if (result == null) result = caseNote(testNote); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.SCENARIO_ELEMENT: { ScenarioElement scenarioElement = (ScenarioElement)theEObject; T result = caseScenarioElement(scenarioElement); if (result == null) result = caseNamedElement(scenarioElement); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.TEST_GENERATION_NOTE: { TestGenerationNote testGenerationNote = (TestGenerationNote)theEObject; T result = caseTestGenerationNote(testGenerationNote); if (result == null) result = caseNote(testGenerationNote); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.VALUE: { Value value = (Value)theEObject; T result = caseValue(value); if (result == null) result = defaultCase(theEObject); return result; } case SpecificationPackage.PARAMETER: { Parameter parameter = (Parameter)theEObject; T result = caseParameter(parameter); if (result == null) result = caseNamedElement(parameter); if (result == null) result = defaultCase(theEObject); return result; } default: return defaultCase(theEObject); } } /** * Returns the result of interpreting the object as an instance of '<em>Specification</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>Specification</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseSpecification(Specification object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Feature</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>Feature</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseFeature(Feature object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Role</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>Role</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseRole(Role object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Capability</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>Capability</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseCapability(Capability object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Benefit</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>Benefit</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseBenefit(Benefit object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Story</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>Story</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseStory(Story object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Scenario</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>Scenario</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseScenario(Scenario object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Context</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>Context</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseContext(Context object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Action</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>Action</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseAction(Action object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Behaviour</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>Behaviour</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseBehaviour(Behaviour object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Automation Layer</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>Automation Layer</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseAutomationLayer(AutomationLayer object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Named 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>Named Element</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseNamedElement(NamedElement object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Note</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>Note</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseNote(Note object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Implementation Note</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>Implementation Note</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseImplementationNote(ImplementationNote object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Test Note</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>Test Note</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseTestNote(TestNote object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Scenario 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>Scenario Element</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseScenarioElement(ScenarioElement object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Test Generation Note</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>Test Generation Note</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseTestGenerationNote(TestGenerationNote object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Value</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>Value</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseValue(Value object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Parameter</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>Parameter</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseParameter(Parameter 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; } } //SpecificationSwitch