Class ForLoopActions

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

@OpenApiAll public class ForLoopActions extends Object
Utility class providing helper methods for accessing and creating input parameters and loop‑variable elements of a ForLoopActionUsage.

A for‑loop action typically includes:

  • a sequence expression supplying iteration values,
  • a body action executed for each value, and
  • a loop variable referencing the current iteration element.
  • Field Details

    • SEQ_ARGUMENT_PARAMETER_INDEX

      public static final int SEQ_ARGUMENT_PARAMETER_INDEX
      Index of the sequence (iteration source) input parameter.
      See Also:
    • BODY_ARGUMENT_PARAMETER_INDEX

      public static final int BODY_ARGUMENT_PARAMETER_INDEX
      Index of the loop body action input parameter.
      See Also:
  • Constructor Details

    • ForLoopActions

      public ForLoopActions()
  • Method Details

    • getOrCreateSeqArgumentParameter

      public static Feature getOrCreateSeqArgumentParameter(ForLoopActionUsage actionUsage)
      Returns the sequence argument of the ForLoopActionUsage, creating it if necessary. The returned feature represents the iteration source.
      Parameters:
      actionUsage - the for‑loop action usage whose sequence argument is requested
      Returns:
      existing or newly created sequence argument feature
    • getOrCreateBodyAction

      public static ActionUsage getOrCreateBodyAction(ForLoopActionUsage actionUsage, Supplier<ActionUsage> parameterFactory)
      Returns the loop body action of the ForLoopActionUsage, creating it if necessary using the supplied factory.
      Parameters:
      actionUsage - the for‑loop action usage whose body action is requested
      parameterFactory - factory used to create the action if missing
      Returns:
      existing or newly created body action
    • getOrCreateLoopVariable

      public static Feature getOrCreateLoopVariable(ForLoopActionUsage actionUsage)
      Returns the loop variable of the ForLoopActionUsage, creating it if necessary. The loop variable is a ReferenceUsage owned by the action and represents the current iteration element.
      Parameters:
      actionUsage - the for‑loop action usage whose loop variable is requested
      Returns:
      existing or newly created loop variable feature