Reputation: 1669
Is there a way to show a recursive method with UML class diagram modelling?
In the above class I have a static method Calculate and I want to show that this method alone calls itself recursively and not any other methods or the class. How do I show this in UML?
Upvotes: 1
Views: 755
Reputation: 15594
You could use a stereotype "recursively" or add a tagged value "recursive=true" to add that information.
Upvotes: 0
Reputation: 19856
In sequence diagrams you can show method calls made by a method, it is therefore possible to show a method is recursive (caling itself). A class diagram, on the contrary, models only the static structure of the system. If you want to emphasize a method is recursive, the only way is to use a comment
Upvotes: 3