Class SeffVisitor
- java.lang.Object
-
- org.eclipse.emf.ecore.util.Switch<T>
-
- org.palladiosimulator.pcm.seff.util.SeffSwitch
-
- org.palladiosimulator.solver.visitors.SeffVisitor
-
- Direct Known Subclasses:
AggregatedContextSEFFVisitor
public class SeffVisitor extends org.palladiosimulator.pcm.seff.util.SeffSwitch
Visitor that builds the computed usage and computed allocation contexts.
-
-
Field Summary
Fields Modifier and Type Field Description protected ContextWrapper
contextWrapper
Context wrapper for access to context information.
-
Constructor Summary
Constructors Constructor Description SeffVisitor(ContextWrapper wrapper)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
caseAbstractInternalControlFlowAction(org.palladiosimulator.pcm.seff.AbstractInternalControlFlowAction action)
Handles recovery block actions.Object
caseAcquireAction(org.palladiosimulator.pcm.seff.AcquireAction action)
Handles acquire actions.Object
caseBranchAction(org.palladiosimulator.pcm.seff.BranchAction action)
Handles branch actions.Object
caseCollectionIteratorAction(org.palladiosimulator.pcm.seff.CollectionIteratorAction action)
Handles collection iterator actions.Object
caseExternalCallAction(org.palladiosimulator.pcm.seff.ExternalCallAction action)
Handles external call actions.Object
caseForkAction(org.palladiosimulator.pcm.seff.ForkAction action)
Handles fork actions.Object
caseGuardedBranchTransition(org.palladiosimulator.pcm.seff.GuardedBranchTransition transition)
Handles guarded branch transitions.Object
caseInternalAction(org.palladiosimulator.pcm.seff.InternalAction action)
Handles internal actions.Object
caseLoopAction(org.palladiosimulator.pcm.seff.LoopAction action)
Handles loop actions.Object
caseProbabilisticBranchTransition(org.palladiosimulator.pcm.seff.ProbabilisticBranchTransition transition)
Handles probabilistic branch transitions.Object
caseReleaseAction(org.palladiosimulator.pcm.seff.ReleaseAction action)
Handles release actions.Object
caseResourceDemandingBehaviour(org.palladiosimulator.pcm.seff.ResourceDemandingBehaviour behaviour)
Handles resource demanding behaviours.Object
caseResourceDemandingSEFF(org.palladiosimulator.pcm.seff.ResourceDemandingSEFF behaviour)
Handles resource demanding seffs.Object
caseSetVariableAction(org.palladiosimulator.pcm.seff.SetVariableAction action)
Handles set variable actions.Object
caseStartAction(org.palladiosimulator.pcm.seff.StartAction action)
Handles start actions.Object
caseStopAction(org.palladiosimulator.pcm.seff.StopAction action)
Handles stop actions.ContextWrapper
getContextWrapper()
Retrieves the context wrapper.void
setContextWrapper(ContextWrapper wrapper)
Sets the context wrapper.-
Methods inherited from class org.palladiosimulator.pcm.seff.util.SeffSwitch
caseAbstractAction, caseAbstractBranchTransition, caseAbstractLoopAction, caseCallAction, caseCallReturnAction, caseEmitEventAction, caseEntity, caseFailureHandlingEntity, caseForkedBehaviour, caseIdentifier, caseInternalCallAction, caseNamedElement, caseResourceDemandingInternalBehaviour, caseServiceEffectSpecification, caseSynchronisationPoint, defaultCase, doSwitch, isSwitchFor
-
-
-
-
Field Detail
-
contextWrapper
protected ContextWrapper contextWrapper
Context wrapper for access to context information.
-
-
Constructor Detail
-
SeffVisitor
public SeffVisitor(ContextWrapper wrapper)
The constructor.- Parameters:
wrapper
- reference to the context wrapper
-
-
Method Detail
-
caseAbstractInternalControlFlowAction
public Object caseAbstractInternalControlFlowAction(org.palladiosimulator.pcm.seff.AbstractInternalControlFlowAction action)
Handles recovery block actions. This is a workaround implementing the case for the base class of the RecoveryBlockAction type, as the type itself is not directly in the SEFF package and thus not handled by the SeffSwitch.- Overrides:
caseAbstractInternalControlFlowAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
action
- the recovery block action- Returns:
- the recovery block action
-
caseAcquireAction
public Object caseAcquireAction(org.palladiosimulator.pcm.seff.AcquireAction action)
Handles acquire actions. Nothing to do for the dependency solver. Just goes to the next action.- Overrides:
caseAcquireAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
action
- the acquire action- Returns:
- the acquire action
-
caseBranchAction
public Object caseBranchAction(org.palladiosimulator.pcm.seff.BranchAction action)
Handles branch actions. Proceeds with the inner branch transitions, then goes to the next action.- Overrides:
caseBranchAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
action
- the branch action- Returns:
- the branch action
-
caseCollectionIteratorAction
public Object caseCollectionIteratorAction(org.palladiosimulator.pcm.seff.CollectionIteratorAction action)
Handles collection iterator actions. Invokes the collectionIteratorHandler, then goes to the next action.- Overrides:
caseCollectionIteratorAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
action
- the collection iterator action- Returns:
- the collection iterator action
-
caseExternalCallAction
public Object caseExternalCallAction(org.palladiosimulator.pcm.seff.ExternalCallAction action)
Handles external call actions. Invokes the externalCallHandler, then goes to the next action.- Overrides:
caseExternalCallAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
action
- the external call action- Returns:
- the external call action
-
caseForkAction
public Object caseForkAction(org.palladiosimulator.pcm.seff.ForkAction action)
Handles fork actions. Invokes the forkActionHandler, then goes to the next action.- Overrides:
caseForkAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
action
- the fork action- Returns:
- the fork action
-
caseGuardedBranchTransition
public Object caseGuardedBranchTransition(org.palladiosimulator.pcm.seff.GuardedBranchTransition transition)
Handles guarded branch transitions. Invokes the guardedBranchHandler.- Overrides:
caseGuardedBranchTransition
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
transition
- the branch transition- Returns:
- the branch transition
-
caseInternalAction
public Object caseInternalAction(org.palladiosimulator.pcm.seff.InternalAction action)
Handles internal actions. Invokes the internalActionHandler, then goes to the next action.- Overrides:
caseInternalAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
action
- the internal action- Returns:
- the internal action
-
caseLoopAction
public Object caseLoopAction(org.palladiosimulator.pcm.seff.LoopAction action)
Handles loop actions. Invokes the loopActionHandler, then goes to the next action.- Overrides:
caseLoopAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
action
- the loop action- Returns:
- the loop action
-
caseProbabilisticBranchTransition
public Object caseProbabilisticBranchTransition(org.palladiosimulator.pcm.seff.ProbabilisticBranchTransition transition)
Handles probabilistic branch transitions. Invokes the probabilisticBranchHandler, then goes to the next action.- Overrides:
caseProbabilisticBranchTransition
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
transition
- the branch transition- Returns:
- the branch transition
-
caseReleaseAction
public Object caseReleaseAction(org.palladiosimulator.pcm.seff.ReleaseAction action)
Handles release actions. Nothing to do for the dependency solver. Just goes to the next action.- Overrides:
caseReleaseAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
action
- the release action- Returns:
- the release action
-
caseResourceDemandingBehaviour
public Object caseResourceDemandingBehaviour(org.palladiosimulator.pcm.seff.ResourceDemandingBehaviour behaviour)
Handles resource demanding behaviours. Goes to the first action within the behaviour.- Overrides:
caseResourceDemandingBehaviour
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
behaviour
- the resource demanding behaviour- Returns:
- the resource demanding behaviour
-
caseResourceDemandingSEFF
public Object caseResourceDemandingSEFF(org.palladiosimulator.pcm.seff.ResourceDemandingSEFF behaviour)
Handles resource demanding seffs. Goes to the first action within the seff.- Overrides:
caseResourceDemandingSEFF
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
behaviour
- the resource demanding seff- Returns:
- the resource demanding seff
-
caseSetVariableAction
public Object caseSetVariableAction(org.palladiosimulator.pcm.seff.SetVariableAction action)
Handles set variable actions. Invokes the setVariableHandler, then goes to the next action.- Overrides:
caseSetVariableAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
action
- the set variable action- Returns:
- the set variable action
-
caseStartAction
public Object caseStartAction(org.palladiosimulator.pcm.seff.StartAction action)
Handles start actions. Nothing to do for the dependency solver. Just goes to the next action.- Overrides:
caseStartAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
action
- the start action- Returns:
- the start action
-
caseStopAction
public Object caseStopAction(org.palladiosimulator.pcm.seff.StopAction action)
Handles stop actions. Saves the contexts that have been created for the surrounding resource demanding seff.- Overrides:
caseStopAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch
- Parameters:
action
- the stop action- Returns:
- the stop action
-
getContextWrapper
public ContextWrapper getContextWrapper()
Retrieves the context wrapper.- Returns:
- the context wrapper
-
setContextWrapper
public void setContextWrapper(ContextWrapper wrapper)
Sets the context wrapper.- Parameters:
wrapper
- the context wrapper
-
-