SAM

org.topcased.sam.util
Class SAMSwitch<T>

java.lang.Object
  extended by org.topcased.sam.util.SAMSwitch<T>

public class SAMSwitch<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:
SAMPackage
** Generated **

Field Summary
static java.lang.String copyright
           
protected static SAMPackage modelPackage
          The cached model package
 
Constructor Summary
SAMSwitch()
          Creates an instance of the switch
 
Method Summary
 T caseAbstractState(AbstractState object)
          Returns the result of interpretting the object as an instance of 'Abstract State'.
 T caseAutomaton(Automaton object)
          Returns the result of interpretting the object as an instance of 'Automaton'.
 T caseComposition(Composition object)
          Returns the result of interpretting the object as an instance of 'Composition'.
 T caseControlFlow(ControlFlow object)
          Returns the result of interpretting the object as an instance of 'Control Flow'.
 T caseControlPort(ControlPort object)
          Returns the result of interpretting the object as an instance of 'Control Port'.
 T caseDataFlow(DataFlow object)
          Returns the result of interpretting the object as an instance of 'Data Flow'.
 T caseDataPort(DataPort object)
          Returns the result of interpretting the object as an instance of 'Data Port'.
 T caseDataStore(DataStore object)
          Returns the result of interpretting the object as an instance of 'Data Store'.
 T caseDecomposition(Decomposition object)
          Returns the result of interpretting the object as an instance of 'Decomposition'.
 T caseEModelElement(EModelElement object)
          Returns the result of interpretting the object as an instance of 'EModel Element'.
 T caseFlow(Flow object)
          Returns the result of interpretting the object as an instance of 'Flow'
 T caseIdentifiedItem(IdentifiedItem object)
          Returns the result of interpretting the object as an instance of 'Identified Item'.
 T caseInControlPort(InControlPort object)
          Returns the result of interpretting the object as an instance of 'In Control Port'.
 T caseInDataPort(InDataPort object)
          Returns the result of interpretting the object as an instance of 'In Data Port'.
 T caseInitialState(InitialState object)
          Returns the result of interpretting the object as an instance of 'Initial State'.
 T caseInputPort(InputPort object)
          Returns the result of interpretting the object as an instance of 'Input Port'.
 T caseMacroState(MacroState object)
          Returns the result of interpretting the object as an instance of 'Macro State'.
 T caseModel(Model object)
          Returns the result of interpretting the object as an instance of 'Model'
 T caseModelContent(ModelContent object)
          Returns the result of interpretting the object as an instance of 'Model Content'.
 T caseMultiPort(MultiPort object)
          Returns the result of interpretting the object as an instance of 'Multi Port'.
 T caseNamedItem(NamedItem object)
          Returns the result of interpretting the object as an instance of 'Named Item'.
 T caseOutControlPort(OutControlPort object)
          Returns the result of interpretting the object as an instance of 'Out Control Port'.
 T caseOutDataPort(OutDataPort object)
          Returns the result of interpretting the object as an instance of 'Out Data Port'.
 T caseOutputPort(OutputPort object)
          Returns the result of interpretting the object as an instance of 'Output Port'.
 T casePort(Port object)
          Returns the result of interpretting the object as an instance of 'Port'
 T caseState(State object)
          Returns the result of interpretting the object as an instance of 'State'
 T caseSynchronisationGate(SynchronisationGate object)
          Returns the result of interpretting the object as an instance of 'Synchronisation Gate'.
 T caseSystem(System object)
          Returns the result of interpretting the object as an instance of 'System'
 T caseTransition(Transition object)
          Returns the result of interpretting the object as an instance of 'Transition'.
 T defaultCase(EObject object)
          Returns the result of interpretting the object as an instance of 'EObject'
protected  T doSwitch(EClass theEClass, EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result
 T doSwitch(EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result
protected  T doSwitch(int classifierID, 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

copyright

public static final java.lang.String copyright

See Also:
Constant Field Values
** Generated **

modelPackage

protected static SAMPackage modelPackage
The cached model package

** Generated **
Constructor Detail

SAMSwitch

public SAMSwitch()
Creates an instance of the switch.

** Generated **
Method Detail

doSwitch

public T doSwitch(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.
** Generated **

doSwitch

protected T doSwitch(EClass theEClass,
                     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.
** Generated **

doSwitch

protected T doSwitch(int classifierID,
                     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.
** Generated **

caseAbstractState

public T caseAbstractState(AbstractState object)
Returns the result of interpretting the object as an instance of 'Abstract State'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Abstract State'.
See Also:
doSwitch(EObject)
** Generated **

caseAutomaton

public T caseAutomaton(Automaton object)
Returns the result of interpretting the object as an instance of 'Automaton'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Automaton'.
See Also:
doSwitch(EObject)
** Generated **

caseInitialState

public T caseInitialState(InitialState object)
Returns the result of interpretting the object as an instance of 'Initial State'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Initial State'.
See Also:
doSwitch(EObject)
** Generated **

caseMacroState

public T caseMacroState(MacroState object)
Returns the result of interpretting the object as an instance of 'Macro State'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Macro State'.
See Also:
doSwitch(EObject)
** Generated **

caseState

public T caseState(State object)
Returns the result of interpretting the object as an instance of 'State'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'State'.
See Also:
doSwitch(EObject)
** Generated **

caseTransition

public T caseTransition(Transition object)
Returns the result of interpretting the object as an instance of 'Transition'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Transition'.
See Also:
doSwitch(EObject)
** Generated **

caseControlPort

public T caseControlPort(ControlPort object)
Returns the result of interpretting the object as an instance of 'Control Port'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Control Port'.
See Also:
doSwitch(EObject)
** Generated **

caseDataPort

public T caseDataPort(DataPort object)
Returns the result of interpretting the object as an instance of 'Data Port'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Data Port'.
See Also:
doSwitch(EObject)
** Generated **

caseInControlPort

public T caseInControlPort(InControlPort object)
Returns the result of interpretting the object as an instance of 'In Control Port'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'In Control Port'.
See Also:
doSwitch(EObject)
** Generated **

caseInDataPort

public T caseInDataPort(InDataPort object)
Returns the result of interpretting the object as an instance of 'In Data Port'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'In Data Port'.
See Also:
doSwitch(EObject)
** Generated **

caseInputPort

public T caseInputPort(InputPort object)
Returns the result of interpretting the object as an instance of 'Input Port'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Input Port'.
See Also:
doSwitch(EObject)
** Generated **

caseOutControlPort

public T caseOutControlPort(OutControlPort object)
Returns the result of interpretting the object as an instance of 'Out Control Port'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Out Control Port'.
See Also:
doSwitch(EObject)
** Generated **

caseOutDataPort

public T caseOutDataPort(OutDataPort object)
Returns the result of interpretting the object as an instance of 'Out Data Port'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Out Data Port'.
See Also:
doSwitch(EObject)
** Generated **

caseOutputPort

public T caseOutputPort(OutputPort object)
Returns the result of interpretting the object as an instance of 'Output Port'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Output Port'.
See Also:
doSwitch(EObject)
** Generated **

casePort

public T casePort(Port object)
Returns the result of interpretting the object as an instance of 'Port'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Port'.
See Also:
doSwitch(EObject)
** Generated **

caseComposition

public T caseComposition(Composition object)
Returns the result of interpretting the object as an instance of 'Composition'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Composition'.
See Also:
doSwitch(EObject)
** Generated **

caseControlFlow

public T caseControlFlow(ControlFlow object)
Returns the result of interpretting the object as an instance of 'Control 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 interpretting the object as an instance of 'Control Flow'.
See Also:
doSwitch(EObject)
** Generated **

caseDataFlow

public T caseDataFlow(DataFlow object)
Returns the result of interpretting the object as an instance of 'Data 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 interpretting the object as an instance of 'Data Flow'.
See Also:
doSwitch(EObject)
** Generated **

caseDataStore

public T caseDataStore(DataStore object)
Returns the result of interpretting the object as an instance of 'Data Store'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Data Store'.
See Also:
doSwitch(EObject)
** Generated **

caseDecomposition

public T caseDecomposition(Decomposition object)
Returns the result of interpretting the object as an instance of 'Decomposition'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Decomposition'.
See Also:
doSwitch(EObject)
** Generated **

caseFlow

public T caseFlow(Flow object)
Returns the result of interpretting the object as an instance of '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 interpretting the object as an instance of 'Flow'.
See Also:
doSwitch(EObject)
** Generated **

caseSynchronisationGate

public T caseSynchronisationGate(SynchronisationGate object)
Returns the result of interpretting the object as an instance of 'Synchronisation Gate'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Synchronisation Gate'.
See Also:
doSwitch(EObject)
** Generated **

caseSystem

public T caseSystem(System object)
Returns the result of interpretting the object as an instance of 'System'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'System'.
See Also:
doSwitch(EObject)
** Generated **

caseModel

public T caseModel(Model object)
Returns the result of interpretting the object as an instance of '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 interpretting the object as an instance of 'Model'.
See Also:
doSwitch(EObject)
** Generated **

caseModelContent

public T caseModelContent(ModelContent object)
Returns the result of interpretting the object as an instance of 'Model Content'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Model Content'.
See Also:
doSwitch(EObject)
** Generated **

caseIdentifiedItem

public T caseIdentifiedItem(IdentifiedItem object)
Returns the result of interpretting the object as an instance of 'Identified Item'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Identified Item'.
See Also:
doSwitch(EObject)
** Generated **

caseNamedItem

public T caseNamedItem(NamedItem object)
Returns the result of interpretting the object as an instance of 'Named Item'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Named Item'.
See Also:
doSwitch(EObject)
** Generated **

caseMultiPort

public T caseMultiPort(MultiPort object)
Returns the result of interpretting the object as an instance of 'Multi Port'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Multi Port'.
See Also:
doSwitch(EObject)
** Generated **

caseEModelElement

public T caseEModelElement(EModelElement object)
Returns the result of interpretting the object as an instance of 'EModel 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 interpretting the object as an instance of 'EModel Element'.
See Also:
doSwitch(EObject)
** Generated **

defaultCase

public T defaultCase(EObject object)
Returns the result of interpretting 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 interpretting the object as an instance of 'EObject'.
See Also:
doSwitch(org.eclipse.emf.ecore.EObject)
** Generated **

SAM

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.