Class HutnSwitch<T1>

java.lang.Object
org.eclipse.epsilon.hutn.model.hutn.util.HutnSwitch<T1>

public class HutnSwitch<T1> 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:
  • Field Summary

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

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

    Modifier and Type
    Method
    Description
    Returns the result of interpreting the object as an instance of 'Attribute Slot'.
    Returns the result of interpreting the object as an instance of 'Class Object'.
    <T> T1
    Returns the result of interpreting the object as an instance of 'Class Object Slot'.
    Returns the result of interpreting the object as an instance of 'Containment Slot'.
    Returns the result of interpreting the object as an instance of 'Model Element'.
    caseNsUri(NsUri object)
    Returns the result of interpreting the object as an instance of 'Ns Uri'.
    Returns the result of interpreting the object as an instance of 'Object'.
    Returns the result of interpreting the object as an instance of 'Package Object'.
    Returns the result of interpreting the object as an instance of 'Reference Slot'.
    <T> T1
    caseSlot(Slot<T> object)
    Returns the result of interpreting the object as an instance of 'Slot'.
    caseSpec(Spec object)
    Returns the result of interpreting the object as an instance of 'Spec'.
    defaultCase(org.eclipse.emf.ecore.EObject object)
    Returns the result of interpreting the object as an instance of 'EObject'.
    protected T1
    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 T1
    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.
    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.

    Methods inherited from class java.lang.Object

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

    • modelPackage

      protected static HutnPackage modelPackage
      The cached model package
  • Constructor Details

    • HutnSwitch

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

    • doSwitch

      public T1 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 T1 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 T1 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.
    • caseSpec

      public T1 caseSpec(Spec object)
      Returns the result of interpreting the object as an instance of 'Spec'. 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 'Spec'.
      See Also:
    • caseNsUri

      public T1 caseNsUri(NsUri object)
      Returns the result of interpreting the object as an instance of 'Ns Uri'. 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 'Ns Uri'.
      See Also:
    • caseModelElement

      public T1 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:
    • caseObject

      public T1 caseObject(Object object)
      Returns the result of interpreting the object as an instance of 'Object'. 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 'Object'.
      See Also:
    • casePackageObject

      public T1 casePackageObject(PackageObject object)
      Returns the result of interpreting the object as an instance of 'Package Object'. 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 'Package Object'.
      See Also:
    • caseClassObject

      public T1 caseClassObject(ClassObject object)
      Returns the result of interpreting the object as an instance of 'Class Object'. 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 'Class Object'.
      See Also:
    • caseSlot

      public <T> T1 caseSlot(Slot<T> object)
      Returns the result of interpreting the object as an instance of 'Slot'. 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 'Slot'.
      See Also:
    • caseAttributeSlot

      public T1 caseAttributeSlot(AttributeSlot object)
      Returns the result of interpreting the object as an instance of 'Attribute Slot'. 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 'Attribute Slot'.
      See Also:
    • caseClassObjectSlot

      public <T> T1 caseClassObjectSlot(ClassObjectSlot<T> object)
      Returns the result of interpreting the object as an instance of 'Class Object Slot'. 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 'Class Object Slot'.
      See Also:
    • caseContainmentSlot

      public T1 caseContainmentSlot(ContainmentSlot object)
      Returns the result of interpreting the object as an instance of 'Containment Slot'. 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 'Containment Slot'.
      See Also:
    • caseReferenceSlot

      public T1 caseReferenceSlot(ReferenceSlot object)
      Returns the result of interpreting the object as an instance of 'Reference Slot'. 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 'Reference Slot'.
      See Also:
    • defaultCase

      public T1 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: