self message(non recursive) vs self recursive message

痴心易碎 提交于 2019-11-28 23:13:06

You should use a self message when you are calling functions in the class which either don't call other functions, don't send any messages (or they do but you don't want to show this in the sequence).

If you also want to model how the inner functions of the class interact with other lifelines, you have to use recursive calls to show this, otherwise the reader can't know that the messages are sent/received from the inner function.

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