"UML" Java code and UML Model Mutual transformation method

Source: Internet
Author: User

Recently relive a few design patterns, see everyone's blog is Java code +uml view, UML Express the overall framework, and then show the specific code, entire areas, at a glance. So we also studied how the Java code and UML model are converted to each other.

A common UML modeling tool

    • Three Dajian tooling can be consulted: UML modeling Tool Comparison of Visio, Rational Rose, powerdesign
    • All three can be very good support of UML modeling, due to the eclipse or idea and other code IDE integration is not convenient or not feasible, so no in-depth study

Second, Java, UML Modeling and Reverse tool recommendation

    • Recommended 12 Open Source UML tools: http://developer.51cto.com/art/200911/161814.htm
    • UML Reverse engineering tools for 6 Java projects: Https://www.oschina.net/news/32803/6-java-to-uml-tools
    • Recommended open source UML tools: https://www.cnblogs.com/tk55/p/6194141.html
    • A variety of tools, said the hype, the actual in the Eclipse plug-in is not installed at all or after the installation of a variety of use, spit the Eclipse plugin management confusion.
    • After a few days, found Papyrus,objectaid These two eclipse plug-in effect can also, basically can meet the demand.

Third, the use of papyrus

  • Installation Reference:

    Https://www.eclipse.org/papyrus/download.html

    https://www.eclipse.org/papyrus/downloads/index.php

    http://www.eclipse.org/downloads/download.php?file=/modeling/mdt/papyrus/downloads/drops/3.3.0/R201803070505/ Papyrus-update-3.3.0.zip&protocol=http

    http://www.eclipse.org/downloads/download.php?file=/modeling/mdt/papyrus/downloads/drops/1.0.2/R201502180839/ Papyrus-update-1.0.2.zip&protocol=http

    Https://wiki.eclipse.org/Papyrus_User_Guide#Create_a_new_Model

    Http://wiki.eclipse.org/Java_reverse_engineering

    http://wiki.eclipse.org/Java_Code_Generation
  • Java reverse-generated UML example:
  • Only the basic interface implementation relationship can be shown, a little disappointed. But with this tool modeling capability, the model's ability to generate Java code is strong. It is recommended!!!

Iv.use of Objectaid

  • Objectaid mainly used for Java code reverse UML
  • Installation reference:
  • 49105375

    http://www.objectaid.com/more useful, advanced features need to license, such as: Export graphics

    Https://stackoverflow.com/questions/51786/how-to-generate-uml-diagrams-especially-sequence-diagrams-from-java-code Recommended Tools

    HTTP://GREEN.SOURCEFORGE.NET/2011 Year Update

    http://plantuml.com/Domestic, continuous update

    Http://developer.51cto.com/art/200911/161814.htm

    Https://www.oschina.net/news/32803/6-java-to-uml-tools

    https://www.cnblogs.com/tk55/p/6194141.html
  • Java reverse-generated UML example:

  • Compared to papyrus, reverse UML works better and generates a slightly hidden relationship
  • Inside Eclipse, it is recommended to use papyrus for UML modeling, using Objectaid to reverse Java code to UML

Idea Ultimate version of the UML view function

    • This feature is available only in the idea Ultimate version and requires a fee and can only be tried for free
    • Installation reference:
    • Https://www.jetbrains.com/help/idea/navigating-through-a-diagram-with-the-file-structure-view.html
    • https://stackoverflow.com/questions/51786/how-to-generate-uml-diagrams-especially-sequence-diagrams-from-java-code#
    • When you select a package, directory, or Java file, press and hold Ctrl+alt+u to bring up the Diagram view, as follows:

    • Alas,, or commercial version of the software is good, effect hanging bombing days, interface and implementation, object delegation and other relationships can be analyzed to show out!!!

    

"UML" Java code and UML Model Mutual transformation method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.