2

I have to generate class diagrams from the java files such that the parser must be executable on the command line with the following format:

umlparser classpath output_file_name

umlparser is my .java file name

classpath is a folder name where all the .java source files will be

output file name is the name of the output image file you program will generate ( .jpg, .png or .pdf format)

Tools for parsing Java Source and generating UML diagrams can be used.

I was looking at http://yuml.me/diagram/class/draw and found that that is a good way to generate the class diagram.

However, I can't get the idea how can I get the code in the form of

[Customer|forname:string;surname:string|doPost();doGet()]<>-orders*>[Order]
[Order]++-0..*>[LineItem]
[Order]-[note:Aggregate root{bg:wheat}]

Any insight on how to generate this code?

Any other suggestions are also welcomed.

5
  • possible duplicate of Java API to create UML diagrams Commented Sep 19, 2015 at 0:00
  • Why would you even want code in that form? Textual UML notation? Commented Sep 19, 2015 at 7:37
  • Basically I want to generate the UML diagram from command line in the format of: umlparser classpath output_file_name. I dont want to generate it on IDE. However, I can use any API or library, but how to get result from command line. Commented Sep 20, 2015 at 3:10
  • Are you looking for a UML tool able to reverse Java, generate diagram and having a remote API... I know some of them but I am not sure this is the right place. Commented Sep 21, 2015 at 9:47
  • @RedBeard could you pls let me know that API? Commented Sep 23, 2015 at 6:01

1 Answer 1

1

Maybe you need to take a look at doxygraph. Its maintainers define the tool as follows:

It relies on Doxygen to parse your source code and create an intermediate XML representation of the information it collects, so it supports all the same programming languages that Doxygen supports: C, C++, C#, Objective C, Java, Python, PHP, Tcl, D, IDL, VHDL, and Fortran.

Reverse-engineering functionality is also present in IntelliJ IDEA and Visual Paradigm editors, but it is a paid feature as far as I can remember.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.