Reverse Engineering Sequence Diagram from Java Source Code

Since source code is in text form, it is complex and is hard for human to read or analyze, especially when the logic is complicated and involves a large number of classes. "A picture is worth a thousand words", by visualizing source code with diagram, you can easily realize the classes involve as well as their relationship in run time. In order to help you with that, Visual Paradigm enables you to reverse your Java source code into sequence diagram, so that you can gain a better understanding of Java source code by reading diagram instead of looking to a possibly thousand lines of source code. This is very beneficial for both analysis and communication.

November 10, 2014
User Rating: / 34
Views: 48,706
PDF Link Add comments
Edition: Standard or above (Edition comparison)

  1. Download of this tutorial and extract the zip file to any directory.
  2. Study the source code. Read the register method in to see how it works.
    01 java source code
  3. Start Visual Paradigm
  4. Create a new project by selecting File > New Project from the main menu. In the New Project window, name the project as Account Registration and click Create Blank Project button.
    02 create new project
  5. Select Tools > Code Engineering > Instant Reverse > Java to Sequence Diagram... from the main menu.
  6. In the Instant Reverse Java to Sequence Diagram window, click on Add Source Folder... button.
  7. Select the extracted source folder src. Click Next button.
  8. Select the method to visualize. Select src > > register (String,int). Click the Next button.
    03 instant reverse java to sequence diagram
  9. You need to select a diagram to visualize the interaction. The Create new sequence diagram option is selected and diagram name is entered by default. Click Finish button.
    04 create new sequence diagram
  10. As a result, a sequence diagram is formed. Let's study the diagram.
    05 sequence diagram
    When a person invokes RegisterController's register method (message: 1), it creates an account object (message: 1.1). After that, the controller sets the id, name and age to the account object (message 1.2, 1.3, 1.4) and adds itself to the account list (message: 1.5). The invocation ends with a return (message 1.6).

Related Links

  1. Instant reverse Java sources to sequence diagram



Rate this Article

Click on one of the stars below to rate this article from 1 (lowest) to 5 (highest).

You may be interested in

  1. Data Flow Diagram (DFD) Tutorial
  2. Writing Effective Use Case
  3. Share Design, Discuss Design with PostMania
  4. Draw Entity Relationship Diagram (ERD)
  5. How to Organize Diagrams with Package?
Tags of this article:

Comments (6)

written by Carlos on May 9, 2014

Not working, it does not display the operations to select. I use 11.1

written by Jick Yeung (VP) on May 12, 2014

Hi Carlos,

Thank you for your post. Would you mind submitting a ticket to us, so that we can perform a detailed checking with you? You can submit a ticket at:

If possible, please submit your source code. If not, please provide us with some screenshots regarding your selecting in the various screens that prompted during the reverse engineering process.

Look forward to hearing from you.

written by Ewout Van Gossum on May 17, 2014

I'm using an academic license of 10.2, and I'm having the same problem as Carlos. I submitted a ticket with a screenshot here:

written by mr_problem on August 2, 2014

having the same problem as carlos

written by D. Singh on August 6, 2014

I have same issue. It does not show operations/functions to select from java class which seems like a very basic functionality.

written by Jick Yeung (VP) on August 8, 2014

Hi mr_problem and D. Singh,

Please make sure you have properly selected the root folder of source files. If you are sure you have made it right, please submit a ticket by attaching a screenshot of your folder structure, and your folder selection in the Reverse window. You can submit a ticket at:

Write comment



Enter the calculation result

security code