@OpenApiAll
public class StateMachineHelper
extends java.lang.Object
Constructor and Description |
---|
StateMachineHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
disposeEvent(Event event)
Disposes event if it is not used any more by other elements in the model.
|
static void |
disposeTriggers(java.util.List<Trigger> triggers)
Disposes given collection of triggers and referenced by them events
|
static Classifier |
getClassifierForTransition(Transition transition)
Returns the classifier as context for given transition.
|
static Operation |
getOperationForTransition(Transition transition)
Returns an operation of given transition.
|
static java.util.Collection<Operation> |
getOperationsForTransition(Classifier classifier)
Collects operations from given classifiers, base classifiers and provided interfaces of given classifiers.
|
static Signal |
getSignalForTransition(Transition transition)
Returns a signal of given transition.
|
static Classifier |
getStateMachineContext(StateMachine machine)
Returns the context of the state machine.
|
static boolean |
isCallEvent(Transition transition)
Check if event of given transition is CallEvent
|
static boolean |
isSignalEvent(Transition transition)
Check if event of given transition is SignalEvent
|
static void |
setOperationForTransition(Transition transition,
Operation operation)
Set derived property operation for transition.
|
static void |
setSignalForTransition(Transition transition,
Signal signal)
Set derived property signal for transition.
|
public static void setOperationForTransition(Transition transition, Operation operation)
transition
- the given transitionoperation
- the given operationpublic static void setSignalForTransition(Transition transition, Signal signal)
transition
- the given transitionsignal
- the given signal@CheckForNull public static Operation getOperationForTransition(Transition transition)
transition
- the given transition@CheckForNull public static Signal getSignalForTransition(Transition transition)
transition
- the given transitionpublic static boolean isSignalEvent(Transition transition)
transition
- transitionpublic static boolean isCallEvent(Transition transition)
transition
- transitionpublic static java.util.Collection<Operation> getOperationsForTransition(Classifier classifier)
classifier
- classifierInteractionHelper.getOperationsForCallAction(com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Classifier)
@CheckForNull public static Classifier getClassifierForTransition(Transition transition)
transition
- transition@CheckForNull public static Classifier getStateMachineContext(StateMachine machine)
machine
- - state machine.public static void disposeTriggers(java.util.List<Trigger> triggers)
triggers
- triggerspublic static void disposeEvent(@CheckForNull Event event)
event
- event