/** * <copyright> * </copyright> * * $Id$ */ package domain.util; import domain.*; 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 domain.DomainPackage * @generated */ public class DomainSwitch<T> extends Switch<T> { /** * The cached model package * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected static DomainPackage modelPackage; /** * Creates an instance of the switch. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DomainSwitch() { if (modelPackage == null) { modelPackage = DomainPackage.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 DomainPackage.GRAPH_ELEMENT: { GraphElement graphElement = (GraphElement)theEObject; T result = caseGraphElement(graphElement); if (result == null) result = defaultCase(theEObject); return result; } case DomainPackage.CODE_ELEMENT: { CodeElement codeElement = (CodeElement)theEObject; T result = caseCodeElement(codeElement); if (result == null) result = caseGraphElement(codeElement); if (result == null) result = defaultCase(theEObject); return result; } case DomainPackage.PRODUCT: { Product product = (Product)theEObject; T result = caseProduct(product); if (result == null) result = caseCodeElement(product); if (result == null) result = caseGraphElement(product); if (result == null) result = defaultCase(theEObject); return result; } case DomainPackage.API_CLASS: { ApiClass apiClass = (ApiClass)theEObject; T result = caseApiClass(apiClass); if (result == null) result = caseCodeElement(apiClass); if (result == null) result = caseGraphElement(apiClass); if (result == null) result = defaultCase(theEObject); return result; } case DomainPackage.METHOD: { Method method = (Method)theEObject; T result = caseMethod(method); if (result == null) result = caseCodeElement(method); if (result == null) result = caseGraphElement(method); if (result == null) result = defaultCase(theEObject); return result; } case DomainPackage.FIELD: { Field field = (Field)theEObject; T result = caseField(field); if (result == null) result = caseCodeElement(field); if (result == null) result = caseGraphElement(field); if (result == null) result = defaultCase(theEObject); return result; } case DomainPackage.DEPENDENCY: { Dependency dependency = (Dependency)theEObject; T result = caseDependency(dependency); if (result == null) result = caseGraphElement(dependency); if (result == null) result = defaultCase(theEObject); return result; } case DomainPackage.DEPENDENCY_GRAPH: { DependencyGraph dependencyGraph = (DependencyGraph)theEObject; T result = caseDependencyGraph(dependencyGraph); if (result == null) result = defaultCase(theEObject); return result; } case DomainPackage.TRANSITIVE_DEPENDENCY: { TransitiveDependency transitiveDependency = (TransitiveDependency)theEObject; T result = caseTransitiveDependency(transitiveDependency); if (result == null) result = caseDependency(transitiveDependency); if (result == null) result = caseGraphElement(transitiveDependency); if (result == null) result = defaultCase(theEObject); return result; } default: return defaultCase(theEObject); } } /** * Returns the result of interpreting the object as an instance of '<em>Graph 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>Graph Element</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseGraphElement(GraphElement object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Code 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>Code Element</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseCodeElement(CodeElement object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Product</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>Product</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseProduct(Product object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Api Class</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>Api Class</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseApiClass(ApiClass object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Method</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>Method</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseMethod(Method object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Field</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>Field</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseField(Field object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Dependency</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>Dependency</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseDependency(Dependency object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Dependency Graph</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>Dependency Graph</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseDependencyGraph(DependencyGraph object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Transitive Dependency</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>Transitive Dependency</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseTransitiveDependency(TransitiveDependency 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; } } //DomainSwitch