Undefined amount of arguments in UML

懵懂的女人 提交于 2019-12-11 15:05:33

问题


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)
}

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?


回答1:


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:

<parameter> ::= [<direction>] <parameter-name> ’:’ <type-expression> [’[’<multiplicity-range>’]’] [’=’ <default>] [’{’ <parm-property> [’,’ <parm-property>]* ’}’]

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

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

UML does not have a standard notation for annotations.



来源:https://stackoverflow.com/questions/56488387/undefined-amount-of-arguments-in-uml

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!