UMLGraph – Generate Class Diagram from Source Code

UMLGraph banner As you can see from the logo, UMLGraph aim to let user draw UML without using mouse. It generate UML diagram (Class diagram, Sequence diagram) based on a set of declarative syntax.

The most eye catching feature of UMLGraph is its ability to generate Class diagram from Java source code and embed it into javadoc. If you are generating javadoc via Ant build script, you can intergrate its doclet into your Ant script.

And after all these is done, you will get a nice javadoc with the most up to date Class diagram, without any changes to your source code.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

4 Responses to “UMLGraph – Generate Class Diagram from Source Code”

  1. Does it able to generate class diagram for my c++ source code?

    How about illustrate more about how we can do that?

  2. I not yet try UmlGraph with C++, but you may try the approach illustrate in this page.

  3. Help me how to compile the code, what all the requirements it needs (UMLGraph5.1)

  4. I had download UMLGraph 5.1 with source code from

    I found ‘build.xml’ is already in the zip file, so I just use Apache Ant ( to build it. Ant target ‘compile’ is set as default target. So you may build it by just issues command: ant

    I use Apache Ant version 1.7.1, which is the latest stable release for now. And my JDK is JDK 1.6 update 4.

    Hope these help.

Leave a Reply