UML 2.5 has the following definition for a parameter list
<parameter-list> is a list of Parameters of the Operation in the following format: <parameter-list> ::= <parameter> [‘,’<parameter>]*
<parameter> ::= [<direction>] <parameter-name> ‘:’ <type-expression>
[‘[‘<multiplicity>’]’] [‘=’ <default>] [‘{‘ <parm-property> [‘,’
<parm-property>]* ‘}’]
Where:
<direction> ::= ‘in’ | ‘out’ | ‘inout’ (defaults to ‘in’ if omitted).
<parameter-name> is the name of the Parameter.
<type-expression> is an expression that specifies the type of the Parameter.
<multiplicity> is the multiplicity of the Parameter. (See MultiplicityElement – sub clause 7.5).
<default> is an expression that defines the value specification for the default value of the Parameter.
<parm-property> indicates additional property values that apply to the Parameter.
So you can use
+ abc($arg : Integer = 0)
A type expression is not optional, so you cannot leave it, but I think you can think of a convention in which you use something like Unspecified
source
share