Java Development Kit (JDK) is a platform for developing Java applications. It provides the runtime for running Java applications, as well as the tools that needed for develop, compile as well as debug Java programs. JDK provides a large library that ease the development of the software. During design time you may want to present the JDK classes which used in your model. You probably need to re-create them manually before using it. In this article we will show you how you can reverse engineer JDK’s library into class model using Visual Paradigm, and use them in your class diagrams.
This article split into 2 phrases. The first phrase we will generate class models for JDK in an independent project, and in the second phrase we will use the JDK classes in the independent project in your class diagram by creating project reference to it.
To generate the class models for JDK
- Create a brand new project, name is as JDK Library.vpp
- Go to Tools > Code > Instant Reverse...
- Select Java as the Language.
- Select Add Zip, then specify the path to the src.zip which bundled inside JDK in file chooser.
- Make sure Reverse source on demand is selected, then press OK.
- The Class Repository tree will show automatically. Now go to Class Repository tree and expend the Instant Reverse tree node.
- Right click on the src.zip, and select Reverse “src.zip” to Class Repository.
- After that the classes of JDK will be reversed into the project.
- Save your project and now it is ready to use in your own class model.
To use the JDK classes you reversed
- On your project which need to use JDK classes, go to Project > Reference Project…
- Press Add button, then locate the JDK Library.vpp you created in the previous steps.
- Once the JDK project is added, press Close to proceed.
- After that you will able to use the JDK classes as the attribute type. You can also drag & drop those JDK classes from Model Explorer into your diagrams for visual modeling.
You can download the project file which contain all classes reversed from JDK7 at the link below.