简体   繁体   English

创建UML图的Java代码

[英]Java code which creates UML diagrams

I'm creating a program that will reverse engineer Java Source code into a UML class diagram. 我正在创建一个将Java源代码反向工程为UML类图的程序。 I have it reading all of the method names etc already from the source code but I'm wondering if there is any inbuilt Java methods for generating UML such as something like: 我已经从源代码中读取了所有方法名称等,但是我想知道是否有用于生成UML的内置Java方法,例如:

UMLdiagram u = new UMLdiagram();
Class c = new Class();
u.addClass(c);

Is there anything like this or are there any external tools I could use to help draw the UML diagram given that I already know methods, class attribute names etc. 假设我已经知道方法,类属性名称等,是否有类似这样的东西,或者可以使用任何外部工具来帮助绘制UML图。

Take a look at http://en.wikipedia.org/wiki/List_of_Unified_Modeling_Language_tools . 看看http://en.wikipedia.org/wiki/List_of_Unified_Modeling_Language_tools

Some of the tools listed are in Java, some of them are open source and some of them are able to create UML diagrams in the XMI format. 列出的一些工具是Java的,其中一些是开源的,其中一些能够创建XMI格式的UML图。

If you want something light-weight, then Doxygen together with Graphviz can both reverse-engineer Java source code and automatically generate class diagrams with UML_LOOK 如果您想要轻巧的东西,那么DoxygenGraphviz可以对Java源代码进行反向工程,并可以使用UML_LOOK自动生成类图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM