ObjectNode 如何存在符号?

How can a notation exist for ObjectNode?

正如 UML 2.5 所定义的,ObjectNode 是一个抽象 class。据我了解,无法实例化抽象 class。

既然 ObejctNode 无法在模式中实例化,为什么还要使用图形表示法呢?参见 UML 规范图 15.49。

为什么不能呢?

如果一个抽象class定义了一个符号那么这仅仅意味着这是所有子classes使用的符号,除非他们定义自己的符号,覆盖(抽象的符​​号) parent class.

虽然没有明确提及,但这似乎与 classifier 的表示法非常相似。 来自 UML 2.5 规范:

9.2.4.1 Classifiers

Classifier is an abstract metaclass. It is nevertheless convenient to define in one place a default notation available for any concrete subclass of Classifier. Some specializations of Classifier have their own distinct notations.

抽象meta-class操作中使用了另一个类似的结构:

16.2.4.1 Actions

Actions are notated as round-cornered rectangles, as shown in Figure 16.2. The name of the action or other description of it may appear in the symbol. (Specialized notations for certain specific kinds of Actions are described in subsequent sub clauses.)

@granier,你说得对,这是 UML 2.5 规范中的错字。 Objectnode绝对可以实例化。