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.SeffSwitchVisitor that builds the computed usage and computed allocation contexts.
-
-
Field Summary
Fields Modifier and Type Field Description protected ContextWrappercontextWrapperContext 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 ObjectcaseAbstractInternalControlFlowAction(org.palladiosimulator.pcm.seff.AbstractInternalControlFlowAction action)Handles recovery block actions.ObjectcaseAcquireAction(org.palladiosimulator.pcm.seff.AcquireAction action)Handles acquire actions.ObjectcaseBranchAction(org.palladiosimulator.pcm.seff.BranchAction action)Handles branch actions.ObjectcaseCollectionIteratorAction(org.palladiosimulator.pcm.seff.CollectionIteratorAction action)Handles collection iterator actions.ObjectcaseExternalCallAction(org.palladiosimulator.pcm.seff.ExternalCallAction action)Handles external call actions.ObjectcaseForkAction(org.palladiosimulator.pcm.seff.ForkAction action)Handles fork actions.ObjectcaseGuardedBranchTransition(org.palladiosimulator.pcm.seff.GuardedBranchTransition transition)Handles guarded branch transitions.ObjectcaseInternalAction(org.palladiosimulator.pcm.seff.InternalAction action)Handles internal actions.ObjectcaseLoopAction(org.palladiosimulator.pcm.seff.LoopAction action)Handles loop actions.ObjectcaseProbabilisticBranchTransition(org.palladiosimulator.pcm.seff.ProbabilisticBranchTransition transition)Handles probabilistic branch transitions.ObjectcaseReleaseAction(org.palladiosimulator.pcm.seff.ReleaseAction action)Handles release actions.ObjectcaseResourceDemandingBehaviour(org.palladiosimulator.pcm.seff.ResourceDemandingBehaviour behaviour)Handles resource demanding behaviours.ObjectcaseResourceDemandingSEFF(org.palladiosimulator.pcm.seff.ResourceDemandingSEFF behaviour)Handles resource demanding seffs.ObjectcaseSetVariableAction(org.palladiosimulator.pcm.seff.SetVariableAction action)Handles set variable actions.ObjectcaseStartAction(org.palladiosimulator.pcm.seff.StartAction action)Handles start actions.ObjectcaseStopAction(org.palladiosimulator.pcm.seff.StopAction action)Handles stop actions.ContextWrappergetContextWrapper()Retrieves the context wrapper.voidsetContextWrapper(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:
caseAbstractInternalControlFlowActionin 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:
caseAcquireActionin 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:
caseBranchActionin 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:
caseCollectionIteratorActionin 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:
caseExternalCallActionin 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:
caseForkActionin 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:
caseGuardedBranchTransitionin 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:
caseInternalActionin 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:
caseLoopActionin 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:
caseProbabilisticBranchTransitionin 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:
caseReleaseActionin 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:
caseResourceDemandingBehaviourin 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:
caseResourceDemandingSEFFin 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:
caseSetVariableActionin 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:
caseStartActionin 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:
caseStopActionin 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
-
-