How to show Dependency Injection on a UML class diagram?

只谈情不闲聊 提交于 2019-12-31 10:31:25

问题


How do I show Dependency Injection of an object or class in a UML class diagram?


回答1:


Martin Fowler shows it like this:




回答2:


You display class dependencies by using a dashed line with a pointed arrow that points from the client model element to the supplier model element.

I think that how you provide the dependencies to the client is irrelevent at the UML level.



来源:https://stackoverflow.com/questions/4488481/how-to-show-dependency-injection-on-a-uml-class-diagram

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