Package org.eclipse.m2m.atl.common.ATL.util

## Class ATLSwitch<T>

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

    public class ATLSwitch<T>
    extends java.lang.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:
  `ATLPackage`

### Field Summary

Fields
`protected static ATLPackage` `modelPackage` The cached model package

### Constructor Summary

Constructors
`ATLSwitch()` Creates an instance of the switch.

### Method Summary

All Methods Instance Methods Concrete Methods
`T` `caseActionBlock​(ActionBlock object)` Returns the result of interpreting the object as an instance of 'Action Block'.
`T` `caseBinding​(Binding object)` Returns the result of interpreting the object as an instance of 'Binding'.
`T` `caseBindingStat​(BindingStat object)` Returns the result of interpreting the object as an instance of 'Binding Stat'.
`T` `caseCalledRule​(CalledRule object)` Returns the result of interpreting the object as an instance of 'Called Rule'.
`T` `caseDropPattern​(DropPattern object)` Returns the result of interpreting the object as an instance of 'Drop Pattern'.
`T` `caseExpressionStat​(ExpressionStat object)` Returns the result of interpreting the object as an instance of 'Expression Stat'.
`T` `caseForEachOutPatternElement​(ForEachOutPatternElement object)` Returns the result of interpreting the object as an instance of 'For Each Out Pattern Element'.
`T` `caseForStat​(ForStat object)` Returns the result of interpreting the object as an instance of 'For Stat'.
`T` `caseHelper​(Helper object)` Returns the result of interpreting the object as an instance of 'Helper'.
`T` `caseIfStat​(IfStat object)` Returns the result of interpreting the object as an instance of 'If Stat'.
`T` `caseInPattern​(InPattern object)` Returns the result of interpreting the object as an instance of 'In Pattern'.
`T` `caseInPatternElement​(InPatternElement object)` Returns the result of interpreting the object as an instance of 'In Pattern Element'.
`T` `caseLazyMatchedRule​(LazyMatchedRule object)` Returns the result of interpreting the object as an instance of 'Lazy Matched Rule'.
`T` `caseLibrary​(Library object)` Returns the result of interpreting the object as an instance of 'Library'.
`T` `caseLibraryRef​(LibraryRef object)` Returns the result of interpreting the object as an instance of 'Library Ref'.
`T` `caseLocatedElement​(LocatedElement object)` Returns the result of interpreting the object as an instance of 'Located Element'.
`T` `caseMatchedRule​(MatchedRule object)` Returns the result of interpreting the object as an instance of 'Matched Rule'.
`T` `caseModule​(Module object)` Returns the result of interpreting the object as an instance of 'Module'.
`T` `caseModuleElement​(ModuleElement object)` Returns the result of interpreting the object as an instance of 'Module Element'.
`T` `caseOutPattern​(OutPattern object)` Returns the result of interpreting the object as an instance of 'Out Pattern'.
`T` `caseOutPatternElement​(OutPatternElement object)` Returns the result of interpreting the object as an instance of 'Out Pattern Element'.
`T` `casePatternElement​(PatternElement object)` Returns the result of interpreting the object as an instance of 'Pattern Element'.
`T` `caseQuery​(Query object)` Returns the result of interpreting the object as an instance of 'Query'.
`T` `caseRule​(Rule object)` Returns the result of interpreting the object as an instance of 'Rule'.
`T` `caseRuleVariableDeclaration​(RuleVariableDeclaration object)` Returns the result of interpreting the object as an instance of 'Rule Variable Declaration'.
`T` `caseSimpleInPatternElement​(SimpleInPatternElement object)` Returns the result of interpreting the object as an instance of 'Simple In Pattern Element'.
`T` `caseSimpleOutPatternElement​(SimpleOutPatternElement object)` Returns the result of interpreting the object as an instance of 'Simple Out Pattern Element'.
`T` `caseStatement​(Statement object)` Returns the result of interpreting the object as an instance of 'Statement'.
`T` `caseUnit​(Unit object)` Returns the result of interpreting the object as an instance of 'Unit'.
`T` `caseVariableDeclaration​(VariableDeclaration object)` Returns the result of interpreting the object as an instance of 'Variable Declaration'.
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### modelPackage

    protected static ATLPackage modelPackage

The cached model package

### Constructor Detail

#### ATLSwitch

    public ATLSwitch()

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.

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `doSwitch(EObject)`

#### 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:
  `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)`