| /** |
| * <copyright> |
| * </copyright> |
| * |
| * $Id$ |
| */ |
| package org.eclipse.stem.loggers.imagewriter.util; |
| |
| import java.util.List; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EObject; |
| |
| import org.eclipse.stem.core.common.Identifiable; |
| |
| import org.eclipse.stem.core.logger.Logger; |
| |
| import org.eclipse.stem.loggers.SimulationLogger; |
| import org.eclipse.stem.loggers.SynchronousLogger; |
| |
| import org.eclipse.stem.loggers.imagewriter.*; |
| |
| /** |
| * <!-- 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 org.eclipse.stem.loggers.imagewriter.ImagewriterPackage |
| * @generated |
| */ |
| public class ImagewriterSwitch<T1> { |
| /** |
| * The cached model package |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected static ImagewriterPackage modelPackage; |
| |
| /** |
| * Creates an instance of the switch. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ImagewriterSwitch() { |
| if (modelPackage == null) { |
| modelPackage = ImagewriterPackage.eINSTANCE; |
| } |
| } |
| |
| /** |
| * 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 |
| */ |
| public T1 doSwitch(EObject theEObject) { |
| return doSwitch(theEObject.eClass(), theEObject); |
| } |
| |
| /** |
| * 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 |
| */ |
| protected T1 doSwitch(EClass theEClass, EObject theEObject) { |
| if (theEClass.eContainer() == modelPackage) { |
| return doSwitch(theEClass.getClassifierID(), theEObject); |
| } |
| else { |
| List<EClass> eSuperTypes = theEClass.getESuperTypes(); |
| return |
| eSuperTypes.isEmpty() ? |
| defaultCase(theEObject) : |
| doSwitch(eSuperTypes.get(0), theEObject); |
| } |
| } |
| |
| /** |
| * 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 |
| */ |
| protected T1 doSwitch(int classifierID, EObject theEObject) { |
| switch (classifierID) { |
| case ImagewriterPackage.IMAGE_WRITER_LOGGER: { |
| ImageWriterLogger imageWriterLogger = (ImageWriterLogger)theEObject; |
| T1 result = caseImageWriterLogger(imageWriterLogger); |
| if (result == null) result = caseSynchronousLogger(imageWriterLogger); |
| if (result == null) result = caseSimulationLogger(imageWriterLogger); |
| if (result == null) result = caseLogger(imageWriterLogger); |
| if (result == null) result = caseIdentifiable(imageWriterLogger); |
| if (result == null) result = caseComparable(imageWriterLogger); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case ImagewriterPackage.PROJECTED_MAP_IMAGE_LOGGER: { |
| ProjectedMapImageLogger projectedMapImageLogger = (ProjectedMapImageLogger)theEObject; |
| T1 result = caseProjectedMapImageLogger(projectedMapImageLogger); |
| if (result == null) result = caseImageWriterLogger(projectedMapImageLogger); |
| if (result == null) result = caseSynchronousLogger(projectedMapImageLogger); |
| if (result == null) result = caseSimulationLogger(projectedMapImageLogger); |
| if (result == null) result = caseLogger(projectedMapImageLogger); |
| if (result == null) result = caseIdentifiable(projectedMapImageLogger); |
| if (result == null) result = caseComparable(projectedMapImageLogger); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case ImagewriterPackage.MAP_VIEW_IMAGE_WRITER_LOGGER: { |
| MapViewImageWriterLogger mapViewImageWriterLogger = (MapViewImageWriterLogger)theEObject; |
| T1 result = caseMapViewImageWriterLogger(mapViewImageWriterLogger); |
| if (result == null) result = caseImageWriterLogger(mapViewImageWriterLogger); |
| if (result == null) result = caseSynchronousLogger(mapViewImageWriterLogger); |
| if (result == null) result = caseSimulationLogger(mapViewImageWriterLogger); |
| if (result == null) result = caseLogger(mapViewImageWriterLogger); |
| if (result == null) result = caseIdentifiable(mapViewImageWriterLogger); |
| if (result == null) result = caseComparable(mapViewImageWriterLogger); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| case ImagewriterPackage.EQUIRECTANGULAR_MAP_LOGGER: { |
| EquirectangularMapLogger equirectangularMapLogger = (EquirectangularMapLogger)theEObject; |
| T1 result = caseEquirectangularMapLogger(equirectangularMapLogger); |
| if (result == null) result = caseProjectedMapImageLogger(equirectangularMapLogger); |
| if (result == null) result = caseImageWriterLogger(equirectangularMapLogger); |
| if (result == null) result = caseSynchronousLogger(equirectangularMapLogger); |
| if (result == null) result = caseSimulationLogger(equirectangularMapLogger); |
| if (result == null) result = caseLogger(equirectangularMapLogger); |
| if (result == null) result = caseIdentifiable(equirectangularMapLogger); |
| if (result == null) result = caseComparable(equirectangularMapLogger); |
| if (result == null) result = defaultCase(theEObject); |
| return result; |
| } |
| default: return defaultCase(theEObject); |
| } |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Image Writer Logger</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>Image Writer Logger</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T1 caseImageWriterLogger(ImageWriterLogger object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Projected Map Image Logger</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>Projected Map Image Logger</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T1 caseProjectedMapImageLogger(ProjectedMapImageLogger object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Map View Image Writer Logger</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>Map View Image Writer Logger</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T1 caseMapViewImageWriterLogger(MapViewImageWriterLogger object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Equirectangular Map Logger</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>Equirectangular Map Logger</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T1 caseEquirectangularMapLogger(EquirectangularMapLogger object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Comparable</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>Comparable</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public <T> T1 caseComparable(Comparable<T> object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Identifiable</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>Identifiable</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T1 caseIdentifiable(Identifiable object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Logger</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>Logger</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T1 caseLogger(Logger object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Simulation Logger</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>Simulation Logger</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T1 caseSimulationLogger(SimulationLogger object) { |
| return null; |
| } |
| |
| /** |
| * Returns the result of interpreting the object as an instance of '<em>Synchronous Logger</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>Synchronous Logger</em>'. |
| * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
| * @generated |
| */ |
| public T1 caseSynchronousLogger(SynchronousLogger 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 |
| */ |
| public T1 defaultCase(EObject object) { |
| return null; |
| } |
| |
| } //ImagewriterSwitch |