组件 - 子组件关系还是泛化关系?在组件图 UML 中
Component - Subcomponent Relationship or Generalization Relationship? in Component Diagram UML
我对组件 - 子组件关系感到困惑,并且
组件之间的泛化关系。
我们何时需要将两个组件作为组件 - 子组件关系提及,何时将它们作为泛化关系提及。
在Component Diagrams中,Generalization关系(图A)可以一直被称为Component-Subcomponent关系(图B)吗? (可以理解,inverse为假)
图A:
图B:
图B
中的符号用来表示component realization关系
www.omg.org/spec/UML/2.5/Beta2:
11.6.3 Structured Classifiers → Components → Semantics
...A Component
may be realized (or implemented) by a number of Classifiers. In that case, a Component
owns a set of ComponentRealizations
to these Classifiers
.
A component acts like a Package
for all model elements that are involved in or related to its definition, which should be either owned or imported explicitly. Typically the Classifiers
that realize a Component
are owned by it...
您可以像使用任何其他 class 一样使用 generalization relationship (figure A
) between components as usual because component is an UML classifier。
但是图A
和图B
代表不同的东西和图B
你的例子是不行
我对组件 - 子组件关系感到困惑,并且 组件之间的泛化关系。
我们何时需要将两个组件作为组件 - 子组件关系提及,何时将它们作为泛化关系提及。
在Component Diagrams中,Generalization关系(图A)可以一直被称为Component-Subcomponent关系(图B)吗? (可以理解,inverse为假)
图A:
图B:
图
B
中的符号用来表示component realization关系www.omg.org/spec/UML/2.5/Beta2:
11.6.3 Structured Classifiers → Components → Semantics
...A
Component
may be realized (or implemented) by a number of Classifiers. In that case, aComponent
owns a set ofComponentRealizations
to theseClassifiers
.A component acts like a
Package
for all model elements that are involved in or related to its definition, which should be either owned or imported explicitly. Typically theClassifiers
that realize aComponent
are owned by it...您可以像使用任何其他 class 一样使用 generalization relationship (figure
A
) between components as usual because component is an UML classifier。
但是图A
和图B
代表不同的东西和图B
你的例子是不行