@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.Collection<Trigger> triggers) |
static void |
disposeTriggers(java.util.List<Trigger> triggers)
Deprecated.
|
static Classifier |
getClassifierForTransition(Transition transition)
Returns the classifier as context for given transition.
|
static Event |
getEventForTransition(Transition transition)
Returns an event of given transition.
|
static Trigger |
getFirstTrigger(Transition transition)
Returns first trigger from 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(@CheckForNull 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.@Deprecated public static void disposeTriggers(java.util.List<Trigger> triggers)
disposeTriggers(Collection)
triggers
- triggerspublic static void disposeTriggers(java.util.Collection<Trigger> triggers)
public static void disposeEvent(@CheckForNull Event event)
event
- event@CheckForNull public static Event getEventForTransition(Transition transition)
transition
- the given transition@CheckForNull public static Trigger getFirstTrigger(Transition transition)
transition
- transition