EclipseUML 2008 reverse engineering of Legacy Jar file.
In this section you will have a look at how to reverse existing Jar
The reverse engineering of Jar file is an important stage in order to
the architecture of existing applications.
This document is composed of:
- How to import
Legacy jar files in your project
- Jar file reverse engineering process
- Package Diagram
- Reverse the
- Reverse the
Project Packages Dependencies
- Class Diagram Views
- Inheritance reverse
- Dynamic Navigation
Diagram reverse engineering
to import Legacy Jar files in your project
Click in the package explorer New
> Java Project
and create a
new Java Project (e.g. ReversEngineeringLegacyJarFile).
Copy the following two Jar files in your workspace at the root of your
project using windows file manager.
Please not that you need to only select
the two jar file and not to unzip the existing project structure at the
root of the project.
You also should not copy the jar file at
the root of the src. If you don't do exactly the same way, then you
will not be able able to see connectors (e.g. dependencies,
inheritance, associations) between classiefiers and packages. These
instalation requirements are essential because EclipseUML reverse of
Jar file is based on byte code analyses mapping the .class classifiers
with the model and not on the java src detection. It uses therefore
another mecanism and then merge both inside a single model.
Click in the Package Explorer > Refresh in
order to display the newly copied Jar files inside your Eclipse Project.
The imported jar files are now at the
root of your project.
(Note that you should not import the
files at the root of the src. A jar could not be considered as a
java src code because you can not change and manipulate
directly the code).
Click in the Package explorer on the Project > Property > Java Build Path
> Libraries > Add JARs..
The internal Jar files have moved to the Referenced
Libraries folder and could now be reversed by EclipseUML 2008.
2. Package Diagram
Click on the Jar file and select Open / Reverse UML > Nested Package
The jar file structure diagram
is immediately displayed.
the depth of the nested package (e.g. 4 )
We can notice that Javax is the main package containing servlet package
and three nested packages named jsp, ressource and http.
If you look at the Package Explorer then
you only see two packages javax.servlet and javax.servlet.http but the
real structure is different.
So I decided to investigate what is tagext package
and its classifiers.
Double Click on the tagext package
> Inheritence Explorer > select All
You can now dislpay the classifier structure of your package
using a class diagram
I don't see
these classes in my jar file :-)
So my investigation is to click on BodyTag Interface and have a look
where this interface is in
the Package Explorer
Then I realize that this interface
is in another jar file :-)
2.1.2 Reverse the Project packages dependencies
This example helps to show that the reverse of Package using a
Structural view is important in order to understand the project logic
and extend jar classifiers.
Click on the jar file in the Package
Explorer > Open / Reverse UML > Package Diagram
The dependencies are immediately
displayed in the package diagram
The EclipseUML 2008 package diagram reverse gives
you an immediate view of the structure and the dependencies between
Both views are important because just showing dependencies doesn't
explain the logical structure and not showing dependencies doesn't
explain the interaction between packages. A good reverse engineering
therefore display both structural and
dependencies package views.
2.2. Class Diagram
Click on the package in the Package
Explorer > Open / Reverse UML > Class Diagram View > Class
Inheritance Explorer > Fit Diagram to Screen
class diagram is immediately displayed
2.2.2 Dynamic Navigation
I now would like to immediately display only associations.
Click on the diagram background > Associations > Show all
Associations > Manual.
I then click in Inheritance > Hide all Inheritance
and after Arrange Diagram >
The new association class diagram view is immediately displayed
(e.g. dynamic navigation)
I would like to display
dependencies inside this class diagram.
Click on the diagram background > Dependencies > Show all
Dependencies > Manual
I then click in Association> Hide
to clean my previous view) and after Arrange
Diagram > Arrange All
I would like now to visualize element
dependencies, inheritance or association in order to immediately
understand classifiers interactions.
Click on a classifier inside the class diagram and open one of the
(e.g. click on ServletRequestEvent and select dynamic popup menus)
- Sequence Diagram
Click on a method in the Package
Explorer or inside your diagram > Open UML > Generate sequence
(Note that it is impossible to
reverse method from Interface or Abstract method because you don't have
any instance in such classifiers)
The sequence diagram is immediately
2008 sequence diagram reverse can reverse methods having calls inside
To be able to reverse such a method
you need to import all related jar files in your project inside the
Referenced Libraries folder in the Package Explorer.
is the only UML tool on the market to reverse engineering both
structure of your projects.
Omondo is the only tool to reverse legacy jar files and display it in
your package, class and sequence diagrams.