Class SimpleSwitch<T>

java.lang.Object
org.eclipse.emf.ecore.util.Switch<T>
com.regnosys.rosetta.rosetta.simple.util.SimpleSwitch<T>

public class SimpleSwitch<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:
  • Field Details

    • modelPackage

      protected static SimplePackage modelPackage
      The cached model package
  • Constructor Details

    • SimpleSwitch

      public SimpleSwitch()
      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.
    • caseRootElement

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

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

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

      public T caseAnnotationQualifier(AnnotationQualifier object)
      Returns the result of interpreting the object as an instance of 'Annotation Qualifier'. 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 'Annotation Qualifier'.
      See Also:
      • doSwitch(EObject)
    • caseAnnotationRef

      public T caseAnnotationRef(AnnotationRef object)
      Returns the result of interpreting the object as an instance of 'Annotation Ref'. 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 'Annotation Ref'.
      See Also:
      • doSwitch(EObject)
    • caseAssignPathRoot

      public T caseAssignPathRoot(AssignPathRoot object)
      Returns the result of interpreting the object as an instance of 'Assign Path Root'. 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 'Assign Path Root'.
      See Also:
      • doSwitch(EObject)
    • caseAttribute

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

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

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

      public T caseChoiceOption(ChoiceOption object)
      Returns the result of interpreting the object as an instance of 'Choice Option'. 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 'Choice Option'.
      See Also:
      • doSwitch(EObject)
    • caseFunction

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

      public T caseFunctionDispatch(FunctionDispatch object)
      Returns the result of interpreting the object as an instance of 'Function Dispatch'. 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 'Function Dispatch'.
      See Also:
      • doSwitch(EObject)
    • caseCondition

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

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

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

      public T caseShortcutDeclaration(ShortcutDeclaration object)
      Returns the result of interpreting the object as an instance of 'Shortcut Declaration'. 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 'Shortcut Declaration'.
      See Also:
      • doSwitch(EObject)
    • caseReferences

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

      public T caseRosettaRuleReference(RosettaRuleReference object)
      Returns the result of interpreting the object as an instance of 'Rosetta Rule Reference'. 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 'Rosetta Rule Reference'.
      See Also:
      • doSwitch(EObject)
    • caseRosettaRootElement

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

      public T caseRosettaNamed(RosettaNamed object)
      Returns the result of interpreting the object as an instance of 'Named'. 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 'Named'.
      See Also:
      • doSwitch(EObject)
    • caseRosettaDefinable

      public T caseRosettaDefinable(RosettaDefinable object)
      Returns the result of interpreting the object as an instance of 'Definable'. 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 'Definable'.
      See Also:
      • doSwitch(EObject)
    • caseRosettaSymbol

      public T caseRosettaSymbol(RosettaSymbol object)
      Returns the result of interpreting the object as an instance of 'Symbol'. 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 'Symbol'.
      See Also:
      • doSwitch(EObject)
    • caseRosettaFeature

      public T caseRosettaFeature(RosettaFeature object)
      Returns the result of interpreting the object as an instance of 'Feature'. 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 'Feature'.
      See Also:
      • doSwitch(EObject)
    • caseRosettaTyped

      public T caseRosettaTyped(RosettaTyped object)
      Returns the result of interpreting the object as an instance of 'Typed'. 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 'Typed'.
      See Also:
      • doSwitch(EObject)
    • caseRosettaTypedFeature

      public T caseRosettaTypedFeature(RosettaTypedFeature object)
      Returns the result of interpreting the object as an instance of 'Typed Feature'. 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 'Typed Feature'.
      See Also:
      • doSwitch(EObject)
    • caseRosettaType

      public T caseRosettaType(RosettaType object)
      Returns the result of interpreting the object as an instance of 'Type'. 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 'Type'.
      See Also:
      • doSwitch(EObject)
    • caseRosettaCallableWithArgs

      public T caseRosettaCallableWithArgs(RosettaCallableWithArgs object)
      Returns the result of interpreting the object as an instance of 'Callable With Args'. 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 'Callable With Args'.
      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)