Is there a convention for showing overridden methods in UML static class diagrams?

China☆狼群 提交于 2019-12-03 11:26:15

Now there is. Some anonymous got me to dig into the 2.5.1. specs. On p. 102 it says

Members that are inherited by a Classifier may be shown on a diagram of that Classifier by prepending a caret ’^’ symbol to the textual representation that would be shown if the member were not inherited. Thus the notation for an inherited Property is defined like this:

<inherited-property> ::= ’^’ <property>

The specs itself does not (yet) make much use of the caret notation except for figure 9.11 on p. 115 and figure 10.9 on p. 173.


In the specs for 2.5 and before the answer was: No, there isn't. You can only tell that a method is overridden by inspecting the methods of the class from which is inherited.

Though not specified in the UML standard, following is a notation understood to indicate when one function overrides another:

+ toString() : String <<override>>

I duplicate method declaration, if I want to show that inherited class will override it, in other case just omit declaration.

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