java.lang.Object
com.dassault_systemes.modeler.sysml.model.States

@OpenApiAll public class States extends Object
Utility class providing helper methods for working with StateDefinition or StateUsage
  • Constructor Details

    • States

      public States()
  • Method Details

    • isStateUsageOrDefinition

      public static boolean isStateUsageOrDefinition(@CheckForNull Element element)
      Checks whether the given element is a StateUsage or StateDefinition.
      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 a StateUsage or StateDefinition.
      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 an ExhibitStateUsage.
      Parameters:
      eClass - the class to check
      Returns:
      true if the class is an exhibit state usage
    • getOwnedStateSubaction

      @CheckForNull public static ActionUsage getOwnedStateSubaction(Type owner, StateSubactionKind kind)
      Returns the state subaction of the given kind owned by the type, if any.
      Parameters:
      owner - the owning type
      kind - the subaction kind (ENTRY, DO, EXIT)
      Returns:
      the subaction action usage, or null if none exists
    • isEntryDoExitAction

      public static boolean isEntryDoExitAction(@CheckForNull FeatureMembership membership)
      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

      public static boolean isEntryAction(@CheckForNull FeatureMembership membership)
      Checks whether the membership represents an ENTRY subaction.
      Parameters:
      membership - the membership
      Returns:
      true if ENTRY
    • isDoAction

      public static boolean isDoAction(@CheckForNull FeatureMembership membership)
      Checks whether the membership represents a DO subaction.
      Parameters:
      membership - the membership
      Returns:
      true if DO
    • isExitAction

      public static boolean isExitAction(@CheckForNull FeatureMembership membership)
      Checks whether the membership represents an EXIT subaction.
      Parameters:
      membership - the membership
      Returns:
      true if EXIT
    • isStateSubaction

      public static boolean isStateSubaction(Feature feature)
      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

      public static boolean isParallel(Type type)
      Checks whether the given type represents a parallel state.
      Parameters:
      type - the type
      Returns:
      true if the type is a parallel state
    • isSubstateUsageParallel

      @CheckForNull public static Boolean isSubstateUsageParallel(StateUsage stateUsage)
      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