How to Create class diagram from Code? [duplicate]

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 13:23:15

问题


I have project under version control. I need to study code that is not mine. I am trying to find a better way than writing down the classes and their relationships in UML.

Is there a tool that does this automatically?

Note: The files are read-only so I can not use a tool that would have to modify them. I am working in Eclipse environment.


回答1:


this program is very helpful (should work with no code changes)

The ObjectAid UML Explorer

http://www.objectaid.com/home




回答2:


Automatic UML diagrams are not going to be very helpful from existing java source code. You are going to notice that the code is a big mess where the Single Responsibility Principle is not applied consistently. Take a look at inFusion to get some better views on your code. It can export a Famix model for use with Moose. That you can program to get the exact views you currently need.

Do you already have Sonar installed? It provides static views on the code.



来源:https://stackoverflow.com/questions/14772602/how-to-create-class-diagram-from-code

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