Class ATLSwitch<T>

java.lang.Object
org.eclipse.m2m.atl.common.ATL.util.ATLSwitch<T>

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

    • modelPackage

      protected static ATLPackage modelPackage
      The cached model package
  • Constructor Details

    • ATLSwitch

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

    • 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.
    • caseLocatedElement

      public T caseLocatedElement(LocatedElement object)
      Returns the result of interpreting the object as an instance of 'Located 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 'Located Element'.
      See Also:
    • caseUnit

      public T caseUnit(Unit object)
      Returns the result of interpreting the object as an instance of 'Unit'. 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 'Unit'.
      See Also:
    • caseLibrary

      public T caseLibrary(Library object)
      Returns the result of interpreting the object as an instance of 'Library'. 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 'Library'.
      See Also:
    • caseQuery

      public T caseQuery(Query object)
      Returns the result of interpreting the object as an instance of 'Query'. 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 'Query'.
      See Also:
    • caseModule

      public T caseModule(Module object)
      Returns the result of interpreting the object as an instance of 'Module'. 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 'Module'.
      See Also:
    • caseModuleElement

      public T caseModuleElement(ModuleElement object)
      Returns the result of interpreting the object as an instance of 'Module 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 'Module Element'.
      See Also:
    • caseHelper

      public T caseHelper(Helper object)
      Returns the result of interpreting the object as an instance of 'Helper'. 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 'Helper'.
      See Also:
    • caseRule

      public T caseRule(Rule object)
      Returns the result of interpreting the object as an instance of 'Rule'. 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 'Rule'.
      See Also:
    • caseMatchedRule

      public T caseMatchedRule(MatchedRule object)
      Returns the result of interpreting the object as an instance of 'Matched Rule'. 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 'Matched Rule'.
      See Also:
    • caseLazyMatchedRule

      public T caseLazyMatchedRule(LazyMatchedRule object)
      Returns the result of interpreting the object as an instance of 'Lazy Matched Rule'. 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 'Lazy Matched Rule'.
      See Also:
    • caseCalledRule

      public T caseCalledRule(CalledRule object)
      Returns the result of interpreting the object as an instance of 'Called Rule'. 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 'Called Rule'.
      See Also:
    • caseInPattern

      public T caseInPattern(InPattern object)
      Returns the result of interpreting the object as an instance of 'In Pattern'. 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 'In Pattern'.
      See Also:
    • caseOutPattern

      public T caseOutPattern(OutPattern object)
      Returns the result of interpreting the object as an instance of 'Out Pattern'. 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 'Out Pattern'.
      See Also:
    • caseDropPattern

      public T caseDropPattern(DropPattern object)
      Returns the result of interpreting the object as an instance of 'Drop Pattern'. 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 'Drop Pattern'.
      See Also:
    • casePatternElement

      public T casePatternElement(PatternElement object)
      Returns the result of interpreting the object as an instance of 'Pattern 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 'Pattern Element'.
      See Also:
    • caseInPatternElement

      public T caseInPatternElement(InPatternElement object)
      Returns the result of interpreting the object as an instance of 'In Pattern 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 'In Pattern Element'.
      See Also:
    • caseSimpleInPatternElement

      public T caseSimpleInPatternElement(SimpleInPatternElement object)
      Returns the result of interpreting the object as an instance of 'Simple In Pattern 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 'Simple In Pattern Element'.
      See Also:
    • caseOutPatternElement

      public T caseOutPatternElement(OutPatternElement object)
      Returns the result of interpreting the object as an instance of 'Out Pattern 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 'Out Pattern Element'.
      See Also:
    • caseSimpleOutPatternElement

      public T caseSimpleOutPatternElement(SimpleOutPatternElement object)
      Returns the result of interpreting the object as an instance of 'Simple Out Pattern 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 'Simple Out Pattern Element'.
      See Also:
    • caseForEachOutPatternElement

      public T caseForEachOutPatternElement(ForEachOutPatternElement object)
      Returns the result of interpreting the object as an instance of 'For Each Out Pattern 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 'For Each Out Pattern Element'.
      See Also:
    • caseBinding

      public T caseBinding(Binding object)
      Returns the result of interpreting the object as an instance of 'Binding'. 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 'Binding'.
      See Also:
    • caseRuleVariableDeclaration

      public T caseRuleVariableDeclaration(RuleVariableDeclaration object)
      Returns the result of interpreting the object as an instance of 'Rule Variable 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 'Rule Variable Declaration'.
      See Also:
    • caseLibraryRef

      public T caseLibraryRef(LibraryRef object)
      Returns the result of interpreting the object as an instance of 'Library 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 'Library Ref'.
      See Also:
    • caseActionBlock

      public T caseActionBlock(ActionBlock object)
      Returns the result of interpreting the object as an instance of 'Action Block'. 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 'Action Block'.
      See Also:
    • caseStatement

      public T caseStatement(Statement object)
      Returns the result of interpreting the object as an instance of 'Statement'. 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 'Statement'.
      See Also:
    • caseExpressionStat

      public T caseExpressionStat(ExpressionStat object)
      Returns the result of interpreting the object as an instance of 'Expression Stat'. 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 'Expression Stat'.
      See Also:
    • caseBindingStat

      public T caseBindingStat(BindingStat object)
      Returns the result of interpreting the object as an instance of 'Binding Stat'. 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 'Binding Stat'.
      See Also:
    • caseIfStat

      public T caseIfStat(IfStat object)
      Returns the result of interpreting the object as an instance of 'If Stat'. 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 'If Stat'.
      See Also:
    • caseForStat

      public T caseForStat(ForStat object)
      Returns the result of interpreting the object as an instance of 'For Stat'. 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 'For Stat'.
      See Also:
    • caseVariableDeclaration

      public T caseVariableDeclaration(VariableDeclaration object)
      Returns the result of interpreting the object as an instance of 'Variable 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 'Variable Declaration'.
      See Also:
    • 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: