UML 中未定义的参数数量 [英] Undefined amount of arguments in UML

查看:22
本文介绍了UML 中未定义的参数数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个公共方法:

I want to make an public method:

fun createStringBinding(@PropertyKey(resourceBundle = BUNDLE_NAME) key: String, vararg args: Any): StringBinding {
  return Bindings.createStringBinding(Callable { get(key, *args) }, Settings.language)
}

这在 UML 中会是什么样子我是这样做的,但我不确定这是否正确,我也不知道在哪里寻找...

这是正确的吗?

how would this look like in an UML i was doing it like that but i am not sure if this is correct and i also don't know where to look for that...

Is this correct?

推荐答案

OMG 发布的 UML 规范,版本 2.5.1,第 9.6.4 节和第 9.4.4 节中的参数描述了操作的符号.后者内容如下:

The notation for operations is described in the UML specifications published by OMG, version 2.5.1, section 9.6.4 and for parameters in section 9.4.4. The latter reads as follows:

<代码><参数>::= [<方向>] <参数名称>':' <类型表达式>['['']'] ['='] ['{' [',' ]* '}']

多重性必须放在参数类型后面,而不是名称后面.您的操作将指定如下:

The multiplicity must be put behind the parameter type, not behind the name. Your operation would be specified as follows:

+ createStringBinding(key : String, args : Any[0..*]): StringBinding

请注意,AnyStringBinding 不是标准的 UML 数据类型.

Note, that Any and StringBinding are not standard UML data types.

UML 没有用于注释的标准符号.

UML does not have a standard notation for annotations.

这篇关于UML 中未定义的参数数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆