/****************************************************************************** * Copyright (c) 2009-2013, Linagora * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Linagora - initial API and implementation *******************************************************************************/ package com.sun.java.xml.ns.jbi.util; import com.sun.java.xml.ns.jbi.*; 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 com.sun.java.xml.ns.jbi.JbiPackage * @generated */ public class JbiSwitch<T> extends Switch<T> { /** * The cached model package * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected static JbiPackage modelPackage; /** * Creates an instance of the switch. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public JbiSwitch() { if (modelPackage == null) { modelPackage = JbiPackage.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 JbiPackage.ABSTRACT_EXTENSIBLE_ELEMENT: { AbstractExtensibleElement abstractExtensibleElement = (AbstractExtensibleElement)theEObject; T result = caseAbstractExtensibleElement(abstractExtensibleElement); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.CLASS_PATH: { ClassPath classPath = (ClassPath)theEObject; T result = caseClassPath(classPath); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.COMPONENT: { Component component = (Component)theEObject; T result = caseComponent(component); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.COMPONENT_CLASS_NAME: { ComponentClassName componentClassName = (ComponentClassName)theEObject; T result = caseComponentClassName(componentClassName); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.CONNECTION: { Connection connection = (Connection)theEObject; T result = caseConnection(connection); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.CONNECTIONS: { Connections connections = (Connections)theEObject; T result = caseConnections(connections); if (result == null) result = caseAbstractExtensibleElement(connections); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.CONSUMER: { Consumer consumer = (Consumer)theEObject; T result = caseConsumer(consumer); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.DOCUMENT_ROOT: { DocumentRoot documentRoot = (DocumentRoot)theEObject; T result = caseDocumentRoot(documentRoot); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.IDENTIFICATION: { Identification identification = (Identification)theEObject; T result = caseIdentification(identification); if (result == null) result = caseAbstractExtensibleElement(identification); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.JBI: { Jbi jbi = (Jbi)theEObject; T result = caseJbi(jbi); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.SERVICES: { Services services = (Services)theEObject; T result = caseServices(services); if (result == null) result = caseAbstractExtensibleElement(services); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.ABSTRACT_ENDPOINT: { AbstractEndpoint abstractEndpoint = (AbstractEndpoint)theEObject; T result = caseAbstractEndpoint(abstractEndpoint); if (result == null) result = caseAbstractExtensibleElement(abstractEndpoint); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.CONSUMES: { Consumes consumes = (Consumes)theEObject; T result = caseConsumes(consumes); if (result == null) result = caseAbstractEndpoint(consumes); if (result == null) result = caseAbstractExtensibleElement(consumes); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.PROVIDES: { Provides provides = (Provides)theEObject; T result = caseProvides(provides); if (result == null) result = caseAbstractEndpoint(provides); if (result == null) result = caseAbstractExtensibleElement(provides); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.PROVIDER: { Provider provider = (Provider)theEObject; T result = caseProvider(provider); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.SERVICE_ASSEMBLY: { ServiceAssembly serviceAssembly = (ServiceAssembly)theEObject; T result = caseServiceAssembly(serviceAssembly); if (result == null) result = caseAbstractExtensibleElement(serviceAssembly); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.SERVICE_UNIT: { ServiceUnit serviceUnit = (ServiceUnit)theEObject; T result = caseServiceUnit(serviceUnit); if (result == null) result = caseAbstractExtensibleElement(serviceUnit); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.SHARED_LIBRARY_TYPE: { SharedLibraryType sharedLibraryType = (SharedLibraryType)theEObject; T result = caseSharedLibraryType(sharedLibraryType); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.SHARED_LIBRARY_TYPE1: { SharedLibraryType1 sharedLibraryType1 = (SharedLibraryType1)theEObject; T result = caseSharedLibraryType1(sharedLibraryType1); if (result == null) result = defaultCase(theEObject); return result; } case JbiPackage.TARGET: { Target target = (Target)theEObject; T result = caseTarget(target); if (result == null) result = defaultCase(theEObject); return result; } default: return defaultCase(theEObject); } } /** * Returns the result of interpreting the object as an instance of '<em>Abstract Extensible 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>Abstract Extensible Element</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseAbstractExtensibleElement(AbstractExtensibleElement object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Class Path</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>Class Path</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseClassPath(ClassPath object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Component</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>Component</em>'. * @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 '<em>Component Class Name</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>Component Class Name</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseComponentClassName(ComponentClassName object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Connection</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>Connection</em>'. * @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 '<em>Connections</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>Connections</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseConnections(Connections object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Consumer</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>Consumer</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseConsumer(Consumer object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Document Root</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>Document Root</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseDocumentRoot(DocumentRoot object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Identification</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>Identification</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseIdentification(Identification object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Jbi</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>Jbi</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseJbi(Jbi object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Services</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>Services</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseServices(Services object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Abstract Endpoint</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>Abstract Endpoint</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseAbstractEndpoint(AbstractEndpoint object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Consumes</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>Consumes</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseConsumes(Consumes object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Provides</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>Provides</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseProvides(Provides object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Provider</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>Provider</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseProvider(Provider object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Service Assembly</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>Service Assembly</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseServiceAssembly(ServiceAssembly object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Service Unit</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>Service Unit</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseServiceUnit(ServiceUnit object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Shared Library Type</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>Shared Library Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseSharedLibraryType(SharedLibraryType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Shared Library Type1</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>Shared Library Type1</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseSharedLibraryType1(SharedLibraryType1 object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Target</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>Target</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseTarget(Target 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; } } //JbiSwitch