Class ExcelSwitch<T>


  • public class ExcelSwitch<T>
    extends Object
    The Switch for the model's inheritance hierarchy. It supports the call 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 Also:
    ExcelPackage
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static ExcelPackage modelPackage
      The cached model package
    • Constructor Summary

      Constructors 
      Constructor Description
      ExcelSwitch()
      Creates an instance of the switch.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T caseCell​(Cell object)
      Returns the result of interpreting the object as an instance of 'Cell'.
      T caseCellRegion​(CellRegion object)
      Returns the result of interpreting the object as an instance of 'Cell Region'.
      T caseCellStyle​(CellStyle object)
      Returns the result of interpreting the object as an instance of 'Cell Style'.
      T caseColor​(Color object)
      Returns the result of interpreting the object as an instance of 'Color'.
      T caseColumn​(Column object)
      Returns the result of interpreting the object as an instance of 'Column'.
      T caseComment​(Comment object)
      Returns the result of interpreting the object as an instance of 'Comment'.
      T caseEModelElement​(org.eclipse.emf.ecore.EModelElement object)
      Returns the result of interpreting the object as an instance of 'EModel Element'.
      T caseFont​(Font object)
      Returns the result of interpreting the object as an instance of 'Font'.
      T caseHyperlink​(Hyperlink object)
      Returns the result of interpreting the object as an instance of 'Hyperlink'.
      T caseRow​(Row object)
      Returns the result of interpreting the object as an instance of 'Row'.
      T caseSheet​(Sheet object)
      Returns the result of interpreting the object as an instance of 'Sheet'.
      T caseWorkbook​(Workbook object)
      Returns the result of interpreting the object as an instance of 'Workbook'.
      T defaultCase​(org.eclipse.emf.ecore.EObject object)
      Returns the result of interpreting the object as an instance of 'EObject'.
      protected T doSwitch​(int classifierID, org.eclipse.emf.ecore.EObject theEObject)
      Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
      protected T doSwitch​(org.eclipse.emf.ecore.EClass theEClass, org.eclipse.emf.ecore.EObject theEObject)
      Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
      T doSwitch​(org.eclipse.emf.ecore.EObject theEObject)
      Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
    • Field Detail

      • modelPackage

        protected static ExcelPackage modelPackage
        The cached model package
    • Constructor Detail

      • ExcelSwitch

        public ExcelSwitch()
        Creates an instance of the switch.
    • Method Detail

      • doSwitch

        public T doSwitch​(org.eclipse.emf.ecore.EObject theEObject)
        Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
        Returns:
        the first non-null result returned by a caseXXX call.
      • doSwitch

        protected T doSwitch​(org.eclipse.emf.ecore.EClass theEClass,
                             org.eclipse.emf.ecore.EObject theEObject)
        Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
        Returns:
        the first non-null result returned by a caseXXX call.
      • doSwitch

        protected T doSwitch​(int classifierID,
                             org.eclipse.emf.ecore.EObject theEObject)
        Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
        Returns:
        the first non-null result returned by a caseXXX call.
      • caseCell

        public T caseCell​(Cell object)
        Returns the result of interpreting the object as an instance of 'Cell'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Cell'.
        See Also:
        doSwitch(EObject)
      • caseSheet

        public T caseSheet​(Sheet object)
        Returns the result of interpreting the object as an instance of 'Sheet'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Sheet'.
        See Also:
        doSwitch(EObject)
      • caseRow

        public T caseRow​(Row object)
        Returns the result of interpreting the object as an instance of 'Row'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Row'.
        See Also:
        doSwitch(EObject)
      • caseComment

        public T caseComment​(Comment object)
        Returns the result of interpreting the object as an instance of 'Comment'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Comment'.
        See Also:
        doSwitch(EObject)
      • caseCellStyle

        public T caseCellStyle​(CellStyle object)
        Returns the result of interpreting the object as an instance of 'Cell Style'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Cell Style'.
        See Also:
        doSwitch(EObject)
      • caseCellRegion

        public T caseCellRegion​(CellRegion object)
        Returns the result of interpreting the object as an instance of 'Cell Region'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Cell Region'.
        See Also:
        doSwitch(EObject)
      • caseWorkbook

        public T caseWorkbook​(Workbook object)
        Returns the result of interpreting the object as an instance of 'Workbook'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Workbook'.
        See Also:
        doSwitch(EObject)
      • caseFont

        public T caseFont​(Font object)
        Returns the result of interpreting the object as an instance of 'Font'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Font'.
        See Also:
        doSwitch(EObject)
      • caseColumn

        public T caseColumn​(Column object)
        Returns the result of interpreting the object as an instance of 'Column'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Column'.
        See Also:
        doSwitch(EObject)
      • caseColor

        public T caseColor​(Color object)
        Returns the result of interpreting the object as an instance of 'Color'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Color'.
        See Also:
        doSwitch(EObject)
      • caseHyperlink

        public T caseHyperlink​(Hyperlink object)
        Returns the result of interpreting the object as an instance of 'Hyperlink'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Hyperlink'.
        See Also:
        doSwitch(EObject)
      • caseEModelElement

        public T caseEModelElement​(org.eclipse.emf.ecore.EModelElement object)
        Returns the result of interpreting the object as an instance of 'EModel Element'. This implementation returns null; returning a non-null result will terminate the switch.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'EModel Element'.
        See Also:
        doSwitch(EObject)
      • defaultCase

        public T defaultCase​(org.eclipse.emf.ecore.EObject object)
        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.
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'EObject'.
        See Also:
        doSwitch(org.eclipse.emf.ecore.EObject)