Software Disclaimer

Class UML 2.5::Parameter

Description:

A Parameter is a specification of an argument used to pass information into or out of an invocation of a BehavioralFeature. Parameters can be treated as ConnectableElements within Collaborations.

Direct Superclasses: MultiplicityElement, ConnectableElement

Direct Subclasses:

Class Precedence List: Parameter, MultiplicityElement, ConnectableElement, TypedElement, NamedElement, ParameterableElement, Element

Properties:

default : String (0 1); -- source Parameter
defaultValue : ValueSpecification (0 1); -- source Parameter
direction : ParameterDirectionKind (1 1); -- source Parameter
effect : ParameterEffectKind (0 1); -- source Parameter
isException : Boolean (1 1); -- source Parameter
isStream : Boolean (1 1); -- source Parameter
operation : Operation (0 1); -- source Parameter
parameterSet : ParameterSet (0 *); -- source Parameter
isOrdered : Boolean (1 1); -- source MultiplicityElement
isUnique : Boolean (1 1); -- source MultiplicityElement
lower : Integer (1 1); -- source MultiplicityElement
lowerValue : ValueSpecification (0 1); -- source MultiplicityElement
upper : UnlimitedNatural (1 1); -- source MultiplicityElement
upperValue : ValueSpecification (0 1); -- source MultiplicityElement
end : ConnectorEnd (0 *); -- source ConnectableElement
templateParameter : ConnectableElementTemplateParameter (0 1); -- source ConnectableElement
type : Type (0 1); -- source TypedElement
clientDependency : Dependency (0 *); -- source NamedElement
name : String (0 1); -- source NamedElement
nameExpression : StringExpression (0 1); -- source NamedElement
namespace : Namespace (0 1); -- source NamedElement
qualifiedName : String (0 1); -- source NamedElement
visibility : VisibilityKind (0 1); -- source NamedElement
owningTemplateParameter : TemplateParameter (0 1); -- source ParameterableElement
ownedComment : Comment (0 *); -- source Element
ownedElement : Element (0 *); -- source Element
owner : Element (0 1); -- source Element

Constraints:

Signature: CMOF_14_3_25a() : Boolean;
Description: 14.3 [25] For a TypedElement that is a kind of Parameter or Property typed by an PrimitiveType, the defaultValue, if any, must be a kind of LiteralSpecification. see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/typed-element-is-primitive-with-non-literal-default
Expression: type.oclIsKindOf(PrimitiveType) and defaultValue->notEmpty() implies defaultValue.oclIsKindOf(LiteralSpecification)

Signature: CMOF_14_3_24() : Boolean;
Description: 14.3 [24] For a TypedElement that is a kind of Parameter or Property typed by an Enumeration, the defaultValue, if any, must be a kind of InstanceValue. see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/typed-element-is-enumeration-with-non-instance-value-default
Expression: type.oclIsKindOf(Enumeration) and defaultValue->notEmpty() implies defaultValue.oclIsKindOf(InstanceValue)

Signature: CMOF_14_3_23a() : Boolean;
Description: 14.3 [23] A TypedElement that is a kind of Parameter or Property typed by a Class cannot have a default value. see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/typed-element-is-complex-with-default-value
Expression: type.oclIsKindOf(Class) implies defaultValue->isEmpty()

Signature: CMOF_14_3_20() : Boolean;
Description: 14.3 [20] An Operation Parameter must have no effect, exception or streaming characteristics see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/parameter-has-effect see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/parameter-is-exception
Expression: effect->isEmpty() and not (isException or isStream)

Signature: CMOF_14_3_12b() : Boolean;
Description: 14.3 [12] A multi-valued Property or Parameter cannot have a default value. The default value of a Property or Parameter typed by a PrimitiveType must be a kind of LiteralSpecification. The default value of a Property or Parameter typed by an Enumeration must be a kind of InstanceValue. A Property or Parameter typed by a Class cannot have a default value. see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/parameter-has-invalid-default-value see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/property-has-invalid-default-value
Expression: defaultValue->notEmpty() implies (upperBound() <= 1 and ((type.oclIsKindOf(PrimitiveType) and defaultValue.oclIsKindOf(LiteralSpecification)) or (type.oclIsKindOf(Enumeration) and defaultValue.oclIsKindOf(InstanceValue))))

Signature: CMOF_14_3_12a() : Boolean;
Description: 14.3 [12] A multi-valued Property or Parameter cannot have a default value. The default value of a Property or Parameter typed by a PrimitiveType must be a kind of LiteralSpecification. The default value of a Property or Parameter typed by an Enumeration must be a kind of InstanceValue. A Property or Parameter typed by a Class cannot have a default value. see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/parameter-has-invalid-default-value see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/property-has-invalid-default-value
Expression: (upperBound() > 1 or type.oclIsKindOf(Class) implies defaultValue->isEmpty())

Operations:

Signature: default.1() : String;
Description: Derivation for Parameter::/default
Expression: result = (if self.type = String then defaultValue.stringValue() else null endif)



Send questions or comments to [email protected].