UML notation for 'ending' composition

2019-08-04 17:59发布

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.

enter image description here

Thanks!

2条回答
男人必须洒脱
2楼-- · 2019-08-04 18:46

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

查看更多
ゆ 、 Hurt°
3楼-- · 2019-08-04 18:51

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.

查看更多
登录 后发表回答