Class Parameters
java.lang.Object
com.dassault_systemes.modeler.kerml.model.Parameters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Feature>
TcreateInputParameter(Type type) Creates an input parameter for the given type.static <T extends Feature>
TcreateInputParameter(Type type, Expression argument) Creates an input parameter and assigns an argument expression.static <T extends Feature>
TcreateInputParameter(Type type, Supplier<T> parameterFactory) Creates an input parameter using a custom factory.static <T extends Feature>
TcreateParameter(Type type, FeatureDirectionKind featureDirectionKind, Supplier<T> parameterFactory, org.eclipse.emf.ecore.EClass membershipClass) Creates a parameter using a custom factory and membership class.static <T extends Feature>
TcreateParameter(Type type, FeatureDirectionKind featureDirectionKind, org.eclipse.emf.ecore.EClass membershipClass) Creates a parameter of the given direction and membership class.static <T extends Feature>
TcreateReturnParameter(Type type) Creates a return parameter for the given type.getAllInputParameters(Type type) Returns all input parameters of the given type, including inherited ones.static FeatureReturns the first owned input parameter of the given type.static FeaturegetFirstParameter(ParametersParams params) Returns the first parameter matching the given query.Returns all output parameters except return parameters.static FeatureReturns the owned return parameter, creating one if necessary.getOwnedInputParameters(Type type) Returns all owned input parameters of the given type.getOwnedParameters(Type type) Returns all owned parameters of the given type.static FeaturegetOwnedReturnParameter(Type type) Returns the owned return parameter of the given type.getParameters(Type type) Returns all parameters of the given type.getParameters(ParametersParams params) Returns all parameters matching the given query.static FeaturegetReturnParameter(Type type, boolean owned) Returns the return parameter of the given type.static booleanisParameter(Feature feature) Checks whether the given feature is a parameter.static booleanisReturnParameter(Feature feature) Checks whether the given feature is a return parameter.streamOfParameters(ParametersParams params) Returns a stream of parameters for the given parameter query.
-
Constructor Details
-
Parameters
public Parameters()
-
-
Method Details
-
streamOfParameters
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
Returns the first parameter matching the given query.- Parameters:
params- parameter query settings- Returns:
- first matching parameter, or null
-
getFirstOwnedInputParameter
Returns the first owned input parameter of the given type.- Parameters:
type- the type to inspect- Returns:
- first owned input parameter, or null
-
getParameters
Returns all parameters matching the given query.- Parameters:
params- parameter query settings- Returns:
- list of matching parameters
-
isParameter
Checks whether the given feature is a parameter.- Parameters:
feature- the feature to check- Returns:
- true if the feature is a parameter
-
getParameters
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
Returns all owned parameters of the given type.- Parameters:
type- the type to inspect- Returns:
- list of owned parameters
-
getOwnedInputParameters
Returns all owned input parameters of the given type.- Parameters:
type- the type to inspect- Returns:
- list of owned input parameters
-
getAllInputParameters
Returns all input parameters of the given type, including inherited ones.- Parameters:
type- the type to inspect- Returns:
- list of input parameters
-
getNotReturnOutputParameters
Returns all output parameters except return parameters.- Parameters:
type- the type to inspect- Returns:
- list of output parameters excluding return
-
getOwnedReturnParameter
Returns the owned return parameter of the given type.- Parameters:
type- the type to inspect- Returns:
- return parameter, or null
-
getOrCreateOwnedReturnParameter
Returns the owned return parameter, creating one if necessary.- Parameters:
type- the type to modify- Returns:
- existing or newly created return parameter
-
getReturnParameter
Returns the return parameter of the given type.- Parameters:
type- the type to inspectowned- whether to restrict to owned parameters- Returns:
- return parameter, or null
-
isReturnParameter
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
Creates a return parameter for the given type.- Parameters:
type- the type to modify- Returns:
- the created return parameter
-
createInputParameter
Creates an input parameter for the given type.- Parameters:
type- the type to modify- Returns:
- the created input parameter
-
createInputParameter
Creates an input parameter using a custom factory.- Parameters:
type- the type to modifyparameterFactory- 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 modifyargument- 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 modifyfeatureDirectionKind- direction of the parametermembershipClass- 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 modifyfeatureDirectionKind- direction of the parameterparameterFactory- factory for creating the parametermembershipClass- membership class to assign- Returns:
- the created parameter
-