UML notation for 'ending' composition

我只是一个虾纸丫 提交于 2019-12-24 10:11:58

问题


Is there a UML notation for how many levels deep a recursion can be? In a simple composition model I have branches that can have branches or leaves.

But a branch can only have a kid-branch and a grandkid branch, after that, It only can have leaves.

Thanks!


回答1:


Not in UML but there is suplement called OCL (Object Constraint Language). Here is specification http://www.lri.fr/~wolff/teach-material/2008-09/IFIPS-VnV/UML2.0OCL-specification.pdf




回答2:


You can always add manually a constraints on the recursive link. This information would be in UML model but not available graphically. You could also add a graphical constraints which in UML should be a pink color.



来源:https://stackoverflow.com/questions/5259335/uml-notation-for-ending-composition

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