org.eclipse.etrice.generator.etricegen.util
Class ETriceGenSwitch<T>

java.lang.Object
  extended by 
      extended by org.eclipse.etrice.generator.etricegen.util.ETriceGenSwitch<T>

public class ETriceGenSwitch<T>
extends

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:
ETriceGenPackage
EMF generated code

Field Summary
protected static ETriceGenPackage modelPackage
          The cached model package
 
Constructor Summary
ETriceGenSwitch()
          Creates an instance of the switch.
 
Method Summary
 T caseActiveTrigger(ActiveTrigger object)
          Returns the result of interpreting the object as an instance of 'Active Trigger'.
 T caseActorClass(ActorClass object)
          Returns the result of interpreting the object as an instance of 'Actor Class'.
 T caseActorContainerClass(ActorContainerClass object)
          Returns the result of interpreting the object as an instance of 'Actor Container Class'.
 T caseActorInstance(ActorInstance object)
          Returns the result of interpreting the object as an instance of 'Actor Instance'.
 T caseBindingInstance(BindingInstance object)
          Returns the result of interpreting the object as an instance of 'Binding Instance'.
 T caseConnectionInstance(ConnectionInstance object)
          Returns the result of interpreting the object as an instance of 'Connection Instance'.
 T caseExpandedActorClass(ExpandedActorClass object)
          Returns the result of interpreting the object as an instance of 'Expanded Actor Class'.
 T caseIDiagnostician(IDiagnostician object)
          Returns the result of interpreting the object as an instance of 'IDiagnostician'.
 T caseInstanceBase(InstanceBase object)
          Returns the result of interpreting the object as an instance of 'Instance Base'.
 T caseInterfaceItemInstance(InterfaceItemInstance object)
          Returns the result of interpreting the object as an instance of 'Interface Item Instance'.
 T caseITransitionChainVisitor(ITransitionChainVisitor object)
          Returns the result of interpreting the object as an instance of 'ITransition Chain Visitor'.
 T casePortInstance(PortInstance object)
          Returns the result of interpreting the object as an instance of 'Port Instance'.
 T caseRoomClass(RoomClass object)
          Returns the result of interpreting the object as an instance of 'Class'.
 T caseRoot(Root object)
          Returns the result of interpreting the object as an instance of 'Root'.
 T caseSAPInstance(SAPInstance object)
          Returns the result of interpreting the object as an instance of 'SAP Instance'.
 T caseServiceImplInstance(ServiceImplInstance object)
          Returns the result of interpreting the object as an instance of 'Service Impl Instance'.
 T caseSPPInstance(SPPInstance object)
          Returns the result of interpreting the object as an instance of 'SPP Instance'.
 T caseStructureClass(StructureClass object)
          Returns the result of interpreting the object as an instance of 'Structure Class'.
 T caseStructureInstance(StructureInstance object)
          Returns the result of interpreting the object as an instance of 'Structure Instance'.
 T caseSubSystemInstance(SubSystemInstance object)
          Returns the result of interpreting the object as an instance of 'Sub System Instance'.
 T caseTransitionChain(TransitionChain object)
          Returns the result of interpreting the object as an instance of 'Transition Chain'.
 T defaultCase(EObject object)
          Returns the result of interpreting the object as an instance of 'EObject'.
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.
protected  boolean isSwitchFor(EPackage ePackage)
          Checks whether this is a switch for the given package.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelPackage

protected static ETriceGenPackage modelPackage
The cached model package

EMF generated code
Constructor Detail

ETriceGenSwitch

public ETriceGenSwitch()
Creates an instance of the switch.

EMF generated code
Method Detail

isSwitchFor

protected boolean isSwitchFor(EPackage ePackage)
Checks whether this is a switch for the given package.

Returns:
whether this is a switch for the given package.
EMF generated code

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.
EMF generated code

caseRoot

public T caseRoot(Root object)
Returns the result of interpreting the object as an instance of '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 'Root'.
See Also:
doSwitch(EObject)
EMF generated code

caseInstanceBase

public T caseInstanceBase(InstanceBase object)
Returns the result of interpreting the object as an instance of 'Instance Base'. 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 'Instance Base'.
See Also:
doSwitch(EObject)
EMF generated code

caseStructureInstance

public T caseStructureInstance(StructureInstance object)
Returns the result of interpreting the object as an instance of 'Structure Instance'. 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 'Structure Instance'.
See Also:
doSwitch(EObject)
EMF generated code

caseSubSystemInstance

public T caseSubSystemInstance(SubSystemInstance object)
Returns the result of interpreting the object as an instance of 'Sub System Instance'. 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 'Sub System Instance'.
See Also:
doSwitch(EObject)
EMF generated code

caseActorInstance

public T caseActorInstance(ActorInstance object)
Returns the result of interpreting the object as an instance of 'Actor Instance'. 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 'Actor Instance'.
See Also:
doSwitch(EObject)
EMF generated code

caseInterfaceItemInstance

public T caseInterfaceItemInstance(InterfaceItemInstance object)
Returns the result of interpreting the object as an instance of 'Interface Item Instance'. 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 'Interface Item Instance'.
See Also:
doSwitch(EObject)
EMF generated code

casePortInstance

public T casePortInstance(PortInstance object)
Returns the result of interpreting the object as an instance of 'Port Instance'. 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 'Port Instance'.
See Also:
doSwitch(EObject)
EMF generated code

caseBindingInstance

public T caseBindingInstance(BindingInstance object)
Returns the result of interpreting the object as an instance of 'Binding Instance'. 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 Instance'.
See Also:
doSwitch(EObject)
EMF generated code

caseSAPInstance

public T caseSAPInstance(SAPInstance object)
Returns the result of interpreting the object as an instance of 'SAP Instance'. 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 'SAP Instance'.
See Also:
doSwitch(EObject)
EMF generated code

caseSPPInstance

public T caseSPPInstance(SPPInstance object)
Returns the result of interpreting the object as an instance of 'SPP Instance'. 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 'SPP Instance'.
See Also:
doSwitch(EObject)
EMF generated code

caseServiceImplInstance

public T caseServiceImplInstance(ServiceImplInstance object)
Returns the result of interpreting the object as an instance of 'Service Impl Instance'. 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 'Service Impl Instance'.
See Also:
doSwitch(EObject)
EMF generated code

caseConnectionInstance

public T caseConnectionInstance(ConnectionInstance object)
Returns the result of interpreting the object as an instance of 'Connection Instance'. 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 'Connection Instance'.
See Also:
doSwitch(EObject)
EMF generated code

caseActiveTrigger

public T caseActiveTrigger(ActiveTrigger object)
Returns the result of interpreting the object as an instance of 'Active Trigger'. 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 'Active Trigger'.
See Also:
doSwitch(EObject)
EMF generated code

caseTransitionChain

public T caseTransitionChain(TransitionChain object)
Returns the result of interpreting the object as an instance of 'Transition Chain'. 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 'Transition Chain'.
See Also:
doSwitch(EObject)
EMF generated code

caseITransitionChainVisitor

public T caseITransitionChainVisitor(ITransitionChainVisitor object)
Returns the result of interpreting the object as an instance of 'ITransition Chain Visitor'. 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 'ITransition Chain Visitor'.
See Also:
doSwitch(EObject)
EMF generated code

caseIDiagnostician

public T caseIDiagnostician(IDiagnostician object)
Returns the result of interpreting the object as an instance of 'IDiagnostician'. 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 'IDiagnostician'.
See Also:
doSwitch(EObject)
EMF generated code

caseExpandedActorClass

public T caseExpandedActorClass(ExpandedActorClass object)
Returns the result of interpreting the object as an instance of 'Expanded Actor Class'. 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 'Expanded Actor Class'.
See Also:
doSwitch(EObject)
EMF generated code

caseRoomClass

public T caseRoomClass(RoomClass object)
Returns the result of interpreting the object as an instance of 'Class'. 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'.
See Also:
doSwitch(EObject)
EMF generated code

caseStructureClass

public T caseStructureClass(StructureClass object)
Returns the result of interpreting the object as an instance of 'Structure Class'. 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 'Structure Class'.
See Also:
doSwitch(EObject)
EMF generated code

caseActorContainerClass

public T caseActorContainerClass(ActorContainerClass object)
Returns the result of interpreting the object as an instance of 'Actor Container Class'. 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 'Actor Container Class'.
See Also:
doSwitch(EObject)
EMF generated code

caseActorClass

public T caseActorClass(ActorClass object)
Returns the result of interpreting the object as an instance of 'Actor Class'. 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 'Actor Class'.
See Also:
doSwitch(EObject)
EMF generated code

defaultCase

public T defaultCase(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)
EMF generated code