Class Parameters

java.lang.Object
com.dassault_systemes.modeler.kerml.model.Parameters

@OpenApiAll public class Parameters extends Object
Utility class to work with parameters (directed Feature) of Behavior or Step
  • Constructor Details

    • Parameters

      public Parameters()
  • Method Details

    • streamOfParameters

      public static Stream<Feature> streamOfParameters(ParametersParams params)
      Returns a stream of parameters for the given parameter query. Supports filtering by ownership, direction, and return inclusion.
      Parameters:
      params - parameter query settings
      Returns:
      stream of matching parameters
    • getFirstParameter

      @CheckForNull public static Feature getFirstParameter(ParametersParams params)
      Returns the first parameter matching the given query.
      Parameters:
      params - parameter query settings
      Returns:
      first matching parameter, or null
    • getFirstOwnedInputParameter

      @CheckForNull public static Feature getFirstOwnedInputParameter(Type type)
      Returns the first owned input parameter of the given type.
      Parameters:
      type - the type to inspect
      Returns:
      first owned input parameter, or null
    • getParameters

      public static List<Feature> getParameters(ParametersParams params)
      Returns all parameters matching the given query.
      Parameters:
      params - parameter query settings
      Returns:
      list of matching parameters
    • isParameter

      public static boolean isParameter(Feature feature)
      Checks whether the given feature is a parameter.
      Parameters:
      feature - the feature to check
      Returns:
      true if the feature is a parameter
    • getParameters

      public static List<Feature> getParameters(Type type)
      Returns all parameters of the given type.
      Parameters:
      type - the type to inspect
      Returns:
      list of parameters, or empty list if not a behavior or step
    • getOwnedParameters

      public static List<Feature> getOwnedParameters(Type type)
      Returns all owned parameters of the given type.
      Parameters:
      type - the type to inspect
      Returns:
      list of owned parameters
    • getOwnedInputParameters

      public static List<Feature> getOwnedInputParameters(Type type)
      Returns all owned input parameters of the given type.
      Parameters:
      type - the type to inspect
      Returns:
      list of owned input parameters
    • getAllInputParameters

      public static List<Feature> getAllInputParameters(Type type)
      Returns all input parameters of the given type, including inherited ones.
      Parameters:
      type - the type to inspect
      Returns:
      list of input parameters
    • getNotReturnOutputParameters

      public static List<Feature> getNotReturnOutputParameters(Type type)
      Returns all output parameters except return parameters.
      Parameters:
      type - the type to inspect
      Returns:
      list of output parameters excluding return
    • getOwnedReturnParameter

      @CheckForNull public static Feature getOwnedReturnParameter(Type type)
      Returns the owned return parameter of the given type.
      Parameters:
      type - the type to inspect
      Returns:
      return parameter, or null
    • getOrCreateOwnedReturnParameter

      public static Feature getOrCreateOwnedReturnParameter(Type type)
      Returns the owned return parameter, creating one if necessary.
      Parameters:
      type - the type to modify
      Returns:
      existing or newly created return parameter
    • getReturnParameter

      @CheckForNull public static Feature getReturnParameter(Type type, boolean owned)
      Returns the return parameter of the given type.
      Parameters:
      type - the type to inspect
      owned - whether to restrict to owned parameters
      Returns:
      return parameter, or null
    • isReturnParameter

      public static boolean isReturnParameter(Feature feature)
      Checks whether the given feature is a return parameter.
      Parameters:
      feature - the feature to check
      Returns:
      true if the feature is a return parameter
    • createReturnParameter

      public static <T extends Feature> T createReturnParameter(Type type)
      Creates a return parameter for the given type.
      Parameters:
      type - the type to modify
      Returns:
      the created return parameter
    • createInputParameter

      public static <T extends Feature> T createInputParameter(Type type)
      Creates an input parameter for the given type.
      Parameters:
      type - the type to modify
      Returns:
      the created input parameter
    • createInputParameter

      public static <T extends Feature> T createInputParameter(Type type, Supplier<T> parameterFactory)
      Creates an input parameter using a custom factory.
      Parameters:
      type - the type to modify
      parameterFactory - factory for creating the parameter
      Returns:
      the created input parameter
    • createInputParameter

      public static <T extends Feature> T createInputParameter(Type type, @CheckForNull Expression argument)
      Creates an input parameter and assigns an argument expression.
      Parameters:
      type - the type to modify
      argument - the argument expression, or null
      Returns:
      the created input parameter
    • createParameter

      public static <T extends Feature> T createParameter(Type type, FeatureDirectionKind featureDirectionKind, org.eclipse.emf.ecore.EClass membershipClass)
      Creates a parameter of the given direction and membership class.
      Parameters:
      type - the type to modify
      featureDirectionKind - direction of the parameter
      membershipClass - membership class to assign
      Returns:
      the created parameter
    • createParameter

      public static <T extends Feature> T createParameter(Type type, FeatureDirectionKind featureDirectionKind, Supplier<T> parameterFactory, org.eclipse.emf.ecore.EClass membershipClass)
      Creates a parameter using a custom factory and membership class.
      Parameters:
      type - the type to modify
      featureDirectionKind - direction of the parameter
      parameterFactory - factory for creating the parameter
      membershipClass - membership class to assign
      Returns:
      the created parameter