Software engineers often run into the problem of having to re-engineer an existing project for which only code but no models are available. This is where reverse-engineering comes into play; a tool analyzes the existing code and auto-generates a model and a set of Class Diagrams for it.
Poseidon for UML can do this for Java programs, where source code is available and is in a state where it can be compiled without errors. With the corresponding plug-in (JAR Import) it even works with JAR files of compiled Java classes.
To launch this process, go to the generation dialog. The next time you open the code generation dialog, this path will be displayed as output folder by default.
menu and direct the file chooser to the sources' root package. It will then analyze this as well as all sub-packages. The outcome is a model containing the corresponding packages, all the classes, their complete interface, their associations, as well as one Class Diagram for each package. Note that the path that you select here will be automatically adopted by theIf the imported file uses classes that are part of the JDK, these classes will be created in the model as required, so you may see some apparently empty classes in the package java in your model. This is of no concern and is done solely to have a smaller model. But these classes are necessary to have a consistent project. All classes that the imported files use must be present in the model.
Additionally, you can give an import classpath. This is necessary to make the model complete if a file references classes that are not imported themselves. Here you can specify one or more jar files, each entry separated by a colon. If you want to import files that make use of foo.jar, anotherfoo.jar and stillanotherfoo.jar, then it should look similar to this:
folder/subfolder/foo.jar:anotherfolder/anotherfoo.jar:stillanotherfoo.jar
Classes that are needed to make the model complete but are not present in the package structure are created on demand. If you give an import classpath but the imported file does not use any classes from it, then no additional classes will show up in your model.