iAnywhere Water System User Manual

Chapter 4 Reverse Engineering
151
Reverse engineering Java
You can reverse engineer files that contain Java classes into an OOM. For
each existing class in a Java file, a corresponding class is created in the
model, with the same name and containing the same information. When you
reverse engineer a Java class that already exists in a model, you can choose in
the Merge Model window either to replace the existing class, or to keep the
existing class definition in the model.
Reverse engineered Java classes always keep their original names.
When you reverse engineer classes from Java files to a diagram, you can
choose from one of the following four sources:
Source Description Extension
Java .java files Each file contains one or several class
definitions
.java
Java .class files Files that contain one class definition that
has the same name as the file
.class
Directory Folder from which you can reverse all the
Java files, including all those contained in
its sub-directories
Archived Java files Compressed .jar or .zip files. Only the Java
classes contained in these files are
imported into your model. All other
information is discarded
.zip and .jar
An inner class is a class definition that is defined within another (outer) class
definition. Inner classes are commonly used in Java. They help you to
improve the overall visibility of your model by allowing you to group
together classes that logically belong together.
When you reverse a Java class that contains one or more inner classes, one
class is created for the outer class, and one class is created for each of the
inner classes.
A dependency link is created between each inner class and the outer class to
which it belongs. The name of each inner class is prefixed by the name of the
outer class.
Inner Classes