Вопрос

I want to draw a sequence diagram. A class calls a function f for an instance of class B. Class B is implemented by two interfaces, X, and Y.

Both X and Y implement f. How should I denote that the f function comes from either interface X or Y?

Это было полезно?

Решение

Use X::f or Y::f (i.e. two colons instead of dot)

The UML specification says that

A CallEvent is denoted by the name of the triggering Operation (...)

<call-event> ::= <name> [‘(‘ [<assignment-specification>] ‘)’]

Interface is a specialization of Namespace (via Classifier), then the following applies:

If a member of a Namespace with the name N is a NamedElement with the name x, then the member can be referred to by a qualified name of the form N::x.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top