"Responsibility" UML 中的构造型

"Responsibility" stereotype in UML

根据 UML 规范,我们可以通过 << Responsibility >> 构造型(第 22.3 章标准构造型)来表示依赖关系

这是它在规范中的定义:

A contract or an obligation of an element in its relationship to other elements.

你能举例说明这种刻板印象的用法吗?

以下是一些其他定义:

  • The source element is responsible for the target element [Weilkiens, Oestereich 2010].

  • ... signifies that the client has some kind of obligation to the supplier [Scott 2004].

  • The Comment at the supplier end of the Dependency defines the responsibilities of the client class or component [MSDN].

示例: