Class States
java.lang.Object
com.dassault_systemes.modeler.sysml.model.States
Utility class providing helper methods for working with
StateDefinition or StateUsage-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ActionUsagegetOwnedStateSubaction(Type owner, StateSubactionKind kind) Returns the state subaction of the given kind owned by the type, if any.static booleanisDoAction(FeatureMembership membership) Checks whether the membership represents a DO subaction.static booleanisEntryAction(FeatureMembership membership) Checks whether the membership represents an ENTRY subaction.static booleanisEntryDoExitAction(FeatureMembership membership) Checks whether the membership represents an ENTRY, DO, or EXIT state subaction.static booleanisExhibitStateUsage(org.eclipse.emf.ecore.EClass eClass) Checks whether the given EClass represents anExhibitStateUsage.static booleanisExitAction(FeatureMembership membership) Checks whether the membership represents an EXIT subaction.static booleanisParallel(Type type) Checks whether the given type represents a parallel state.static booleanisStateSubaction(Feature feature) Checks whether the given feature is a state subaction.static booleanisStateUsageOrDefinition(Element element) Checks whether the given element is aStateUsageorStateDefinition.static booleanisStateUsageOrDefinition(org.eclipse.emf.ecore.EClass eClass) Checks whether the given EClass represents aStateUsageorStateDefinition.static BooleanisSubstateUsageParallel(StateUsage stateUsage) Determines whether the given state usage is a substate of a parallel state.
-
Constructor Details
-
States
public States()
-
-
Method Details
-
isStateUsageOrDefinition
Checks whether the given element is aStateUsageorStateDefinition.- Parameters:
element- the element to check- Returns:
- true if the element is a state usage or definition
-
isStateUsageOrDefinition
public static boolean isStateUsageOrDefinition(org.eclipse.emf.ecore.EClass eClass) Checks whether the given EClass represents aStateUsageorStateDefinition.- Parameters:
eClass- the class to check- Returns:
- true if the class is a state usage or definition
-
isExhibitStateUsage
public static boolean isExhibitStateUsage(org.eclipse.emf.ecore.EClass eClass) Checks whether the given EClass represents anExhibitStateUsage.- Parameters:
eClass- the class to check- Returns:
- true if the class is an exhibit state usage
-
getOwnedStateSubaction
Returns the state subaction of the given kind owned by the type, if any.- Parameters:
owner- the owning typekind- the subaction kind (ENTRY, DO, EXIT)- Returns:
- the subaction action usage, or null if none exists
-
isEntryDoExitAction
Checks whether the membership represents an ENTRY, DO, or EXIT state subaction.- Parameters:
membership- the membership- Returns:
- true if the membership is an entry/do/exit subaction
-
isEntryAction
Checks whether the membership represents an ENTRY subaction.- Parameters:
membership- the membership- Returns:
- true if ENTRY
-
isDoAction
Checks whether the membership represents a DO subaction.- Parameters:
membership- the membership- Returns:
- true if DO
-
isExitAction
Checks whether the membership represents an EXIT subaction.- Parameters:
membership- the membership- Returns:
- true if EXIT
-
isStateSubaction
Checks whether the given feature is a state subaction.- Parameters:
feature- the feature- Returns:
- true if the feature is an action usage owned by a state subaction membership
-
isParallel
Checks whether the given type represents a parallel state.- Parameters:
type- the type- Returns:
- true if the type is a parallel state
-
isSubstateUsageParallel
Determines whether the given state usage is a substate of a parallel state.- Parameters:
stateUsage- the state usage- Returns:
- true/false if parallelism can be determined, or null if not a substate usage
-