Class AssignmentActions

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

@OpenApiAll public class AssignmentActions extends Object
  • Field Details

    • TARGET_PARAMETER_INDEX

      public static final int TARGET_PARAMETER_INDEX
      Index of the target input parameter.
      See Also:
    • REPLACEMENT_VALUES_PARAMETER_INDEX

      public static final int REPLACEMENT_VALUES_PARAMETER_INDEX
      Index of the replacement-values input parameter.
      See Also:
  • Constructor Details

    • AssignmentActions

      public AssignmentActions()
  • Method Details

    • getOwnedTargetParameter

      @CheckForNull public static Feature getOwnedTargetParameter(AssignmentActionUsage actionUsage)
      Returns the owned target parameter of the assignment action, or null if it has not been created.
      Parameters:
      actionUsage - the assignment action usage
      Returns:
      the owned target parameter, or null
    • getOrCreateTargetParameter

      public static Feature getOrCreateTargetParameter(AssignmentActionUsage actionUsage)
      Returns the target parameter of the assignment action, creating it if necessary. When created, the parameter is initialized with a nested reference structure representing the “startingAt → accessedFeature” pattern.
      Parameters:
      actionUsage - the assignment action usage
      Returns:
      the existing or newly created target parameter
    • createTargetParameterStartingAt

      public static void createTargetParameterStartingAt(Feature targetParameter)
      Initializes a newly created target parameter with a nested reference structure:
       targetParameter
         └─ startingAt : ReferenceUsage
              └─ accessedFeature : ReferenceUsage
       
      This mirrors the typical structure of assignment target expressions.
      Parameters:
      targetParameter - the target parameter to initialize
    • getOwnedReplacementValuesParameter

      @CheckForNull public static Feature getOwnedReplacementValuesParameter(AssignmentActionUsage actionUsage)
      Returns the owned replacement-values parameter of the assignment action, or null if it has not been created.
      Parameters:
      actionUsage - the assignment action usage
      Returns:
      the owned replacement-values parameter, or null
    • getOrCreateReplacementValuesParameter

      public static Feature getOrCreateReplacementValuesParameter(AssignmentActionUsage actionUsage)
      Returns the replacement-values parameter of the assignment action, creating it if necessary.
      Parameters:
      actionUsage - the assignment action usage
      Returns:
      the existing or newly created replacement-values parameter
    • setReferent

      public static void setReferent(AssignmentActionUsage actionUsage, Feature referent)
      Sets the referent of the assignment action. The referent membership is inserted immediately after the target parameter.
      Parameters:
      actionUsage - the assignment action usage
      referent - the feature to set as the referent
    • getReferentMembership

      @CheckForNull public static Membership getReferentMembership(AssignmentActionUsage actionUsage)
      Returns the referent membership of the assignment action, excluding feature memberships. This identifies the membership that holds the referent feature for the assignment.
      Parameters:
      actionUsage - the assignment action usage
      Returns:
      the referent membership, or null