Class UiSwitch<T>

java.lang.Object
org.eclipse.emf.ecore.util.Switch<T>
org.eclipse.gmt.modisco.omg.kdm.ui.util.UiSwitch<T>

public class UiSwitch<T>
extends org.eclipse.emf.ecore.util.Switch<T>
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:
UiPackage
  • Field Summary

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

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

    Modifier and Type Method Description
    T caseAbstractActionRelationship​(AbstractActionRelationship object)
    Returns the result of interpreting the object as an instance of 'Abstract Action Relationship'.
    T caseAbstractUIElement​(AbstractUIElement object)
    Returns the result of interpreting the object as an instance of 'Abstract UI Element'.
    T caseAbstractUIRelationship​(AbstractUIRelationship object)
    Returns the result of interpreting the object as an instance of 'Abstract UI Relationship'.
    T caseDisplays​(Displays object)
    Returns the result of interpreting the object as an instance of 'Displays'.
    T caseDisplaysImage​(DisplaysImage object)
    Returns the result of interpreting the object as an instance of 'Displays Image'.
    T caseElement​(Element object)
    Returns the result of interpreting the object as an instance of 'Element'.
    T caseKDMEntity​(KDMEntity object)
    Returns the result of interpreting the object as an instance of 'KDM Entity'.
    T caseKDMFramework​(KDMFramework object)
    Returns the result of interpreting the object as an instance of 'KDM Framework'.
    T caseKDMModel​(KDMModel object)
    Returns the result of interpreting the object as an instance of 'KDM Model'.
    T caseKDMRelationship​(KDMRelationship object)
    Returns the result of interpreting the object as an instance of 'KDM Relationship'.
    T caseManagesUI​(ManagesUI object)
    Returns the result of interpreting the object as an instance of 'Manages UI'.
    T caseModelElement​(ModelElement object)
    Returns the result of interpreting the object as an instance of 'Model Element'.
    T caseReadsUI​(ReadsUI object)
    Returns the result of interpreting the object as an instance of 'Reads UI'.
    T caseReport​(Report object)
    Returns the result of interpreting the object as an instance of 'Report'.
    T caseScreen​(Screen object)
    Returns the result of interpreting the object as an instance of 'Screen'.
    T caseUIAction​(UIAction object)
    Returns the result of interpreting the object as an instance of 'UI Action'.
    T caseUIDisplay​(UIDisplay object)
    Returns the result of interpreting the object as an instance of 'UI Display'.
    T caseUIElement​(UIElement object)
    Returns the result of interpreting the object as an instance of 'UI Element'.
    T caseUIEvent​(UIEvent object)
    Returns the result of interpreting the object as an instance of 'UI Event'.
    T caseUIField​(UIField object)
    Returns the result of interpreting the object as an instance of 'UI Field'.
    T caseUIFlow​(UIFlow object)
    Returns the result of interpreting the object as an instance of 'UI Flow'.
    T caseUILayout​(UILayout object)
    Returns the result of interpreting the object as an instance of 'UI Layout'.
    T caseUIModel​(UIModel object)
    Returns the result of interpreting the object as an instance of 'UI Model'.
    T caseUIRelationship​(UIRelationship object)
    Returns the result of interpreting the object as an instance of 'UI Relationship'.
    T caseUIResource​(UIResource object)
    Returns the result of interpreting the object as an instance of 'UI Resource'.
    T caseWritesUI​(WritesUI object)
    Returns the result of interpreting the object as an instance of 'Writes UI'.
    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 boolean isSwitchFor​(org.eclipse.emf.ecore.EPackage ePackage)
    Checks whether this is a switch for the given package.

    Methods inherited from class org.eclipse.emf.ecore.util.Switch

    doSwitch, doSwitch

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • modelPackage

      protected static UiPackage modelPackage
      The cached model package
  • Constructor Details

    • UiSwitch

      public UiSwitch()
      Creates an instance of the switch.
  • Method Details

    • isSwitchFor

      protected boolean isSwitchFor​(org.eclipse.emf.ecore.EPackage ePackage)
      Checks whether this is a switch for the given package.
      Specified by:
      isSwitchFor in class org.eclipse.emf.ecore.util.Switch<T>
      Parameters:
      ePackage - the package in question.
      Returns:
      whether this is a switch for the given package.
    • 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.
      Overrides:
      doSwitch in class org.eclipse.emf.ecore.util.Switch<T>
      Returns:
      the first non-null result returned by a caseXXX call.
    • caseAbstractUIElement

      public T caseAbstractUIElement​(AbstractUIElement object)
      Returns the result of interpreting the object as an instance of 'Abstract UI 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 'Abstract UI Element'.
      See Also:
      doSwitch(EObject)
    • caseUIResource

      public T caseUIResource​(UIResource object)
      Returns the result of interpreting the object as an instance of 'UI Resource'. 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 'UI Resource'.
      See Also:
      doSwitch(EObject)
    • caseUIDisplay

      public T caseUIDisplay​(UIDisplay object)
      Returns the result of interpreting the object as an instance of 'UI Display'. 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 'UI Display'.
      See Also:
      doSwitch(EObject)
    • caseScreen

      public T caseScreen​(Screen object)
      Returns the result of interpreting the object as an instance of 'Screen'. 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 'Screen'.
      See Also:
      doSwitch(EObject)
    • caseReport

      public T caseReport​(Report object)
      Returns the result of interpreting the object as an instance of 'Report'. 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 'Report'.
      See Also:
      doSwitch(EObject)
    • caseUIModel

      public T caseUIModel​(UIModel object)
      Returns the result of interpreting the object as an instance of 'UI Model'. 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 'UI Model'.
      See Also:
      doSwitch(EObject)
    • caseAbstractUIRelationship

      public T caseAbstractUIRelationship​(AbstractUIRelationship object)
      Returns the result of interpreting the object as an instance of 'Abstract UI Relationship'. 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 'Abstract UI Relationship'.
      See Also:
      doSwitch(EObject)
    • caseUILayout

      public T caseUILayout​(UILayout object)
      Returns the result of interpreting the object as an instance of 'UI Layout'. 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 'UI Layout'.
      See Also:
      doSwitch(EObject)
    • caseUIField

      public T caseUIField​(UIField object)
      Returns the result of interpreting the object as an instance of 'UI Field'. 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 'UI Field'.
      See Also:
      doSwitch(EObject)
    • caseDisplaysImage

      public T caseDisplaysImage​(DisplaysImage object)
      Returns the result of interpreting the object as an instance of 'Displays Image'. 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 'Displays Image'.
      See Also:
      doSwitch(EObject)
    • caseDisplays

      public T caseDisplays​(Displays object)
      Returns the result of interpreting the object as an instance of 'Displays'. 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 'Displays'.
      See Also:
      doSwitch(EObject)
    • caseUIFlow

      public T caseUIFlow​(UIFlow object)
      Returns the result of interpreting the object as an instance of 'UI Flow'. 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 'UI Flow'.
      See Also:
      doSwitch(EObject)
    • caseUIElement

      public T caseUIElement​(UIElement object)
      Returns the result of interpreting the object as an instance of 'UI 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 'UI Element'.
      See Also:
      doSwitch(EObject)
    • caseUIRelationship

      public T caseUIRelationship​(UIRelationship object)
      Returns the result of interpreting the object as an instance of 'UI Relationship'. 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 'UI Relationship'.
      See Also:
      doSwitch(EObject)
    • caseUIAction

      public T caseUIAction​(UIAction object)
      Returns the result of interpreting the object as an instance of 'UI Action'. 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 'UI Action'.
      See Also:
      doSwitch(EObject)
    • caseUIEvent

      public T caseUIEvent​(UIEvent object)
      Returns the result of interpreting the object as an instance of 'UI Event'. 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 'UI Event'.
      See Also:
      doSwitch(EObject)
    • caseReadsUI

      public T caseReadsUI​(ReadsUI object)
      Returns the result of interpreting the object as an instance of 'Reads UI'. 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 'Reads UI'.
      See Also:
      doSwitch(EObject)
    • caseWritesUI

      public T caseWritesUI​(WritesUI object)
      Returns the result of interpreting the object as an instance of 'Writes UI'. 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 'Writes UI'.
      See Also:
      doSwitch(EObject)
    • caseManagesUI

      public T caseManagesUI​(ManagesUI object)
      Returns the result of interpreting the object as an instance of 'Manages UI'. 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 'Manages UI'.
      See Also:
      doSwitch(EObject)
    • caseElement

      public T caseElement​(Element object)
      Returns the result of interpreting the object as an instance of '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 'Element'.
      See Also:
      doSwitch(EObject)
    • caseModelElement

      public T caseModelElement​(ModelElement object)
      Returns the result of interpreting the object as an instance of 'Model 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 'Model Element'.
      See Also:
      doSwitch(EObject)
    • caseKDMEntity

      public T caseKDMEntity​(KDMEntity object)
      Returns the result of interpreting the object as an instance of 'KDM Entity'. 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 'KDM Entity'.
      See Also:
      doSwitch(EObject)
    • caseKDMFramework

      public T caseKDMFramework​(KDMFramework object)
      Returns the result of interpreting the object as an instance of 'KDM Framework'. 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 'KDM Framework'.
      See Also:
      doSwitch(EObject)
    • caseKDMModel

      public T caseKDMModel​(KDMModel object)
      Returns the result of interpreting the object as an instance of 'KDM Model'. 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 'KDM Model'.
      See Also:
      doSwitch(EObject)
    • caseKDMRelationship

      public T caseKDMRelationship​(KDMRelationship object)
      Returns the result of interpreting the object as an instance of 'KDM Relationship'. 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 'KDM Relationship'.
      See Also:
      doSwitch(EObject)
    • caseAbstractActionRelationship

      public T caseAbstractActionRelationship​(AbstractActionRelationship object)
      Returns the result of interpreting the object as an instance of 'Abstract Action Relationship'. 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 'Abstract Action Relationship'.
      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.
      Overrides:
      defaultCase in class org.eclipse.emf.ecore.util.Switch<T>
      Parameters:
      object - the target of the switch.
      Returns:
      the result of interpreting the object as an instance of 'EObject'.
      See Also:
      Switch.doSwitch(org.eclipse.emf.ecore.EObject)