Instant Code Reverse: Java is a reverse engineering feature in Visual Paradigm Desktop that converts existing Java source code and compiled Java classes into UML model elements. It allows developers to analyze an existing Java codebase visually, generate UML class and package diagrams, and explore the structure and relationships of software without manually recreating the model.
By reversing Java code into UML, developers can use Visual Paradigm to understand legacy applications, document existing implementations, inspect third-party libraries, and gain a clearer understanding of software architecture. The feature supports Java source folders, ZIP archives containing Java source files, compiled class folders, and JAR files.
What Is Instant Code Reverse: Java?
Instant Code Reverse: Java is a code engineering capability in Visual Paradigm Desktop that analyzes Java source code or compiled Java classes and transforms the discovered program structure into UML class models. These model elements can subsequently be organized and visualized through UML class diagrams and package diagrams.
Instead of manually creating UML classes, attributes, operations, and relationships based on existing Java implementation files, developers can use Instant Reverse to extract the available structural information automatically.
How It Fits into Visual Paradigm Desktop
Instant Code Reverse belongs to Visual Paradigm’s code engineering capabilities. Code engineering connects software implementation with visual modeling by allowing developers to transform source code into UML models and, through complementary functionality, generate source code from UML models.
Within this workflow, Instant Code Reverse focuses on the code-to-model direction:
- Input: Existing Java source files, compiled Java classes, JAR files, or ZIP archives containing Java source.
- Processing: Visual Paradigm analyzes the supplied Java resources and extracts recognizable program structures.
- Output: UML class models and, where selected, class diagrams or package diagrams.
- Further modeling: Developers can inspect, organize, and work with the reversed model elements in Visual Paradigm Desktop.
Instant Code Reverse vs. Instant Code Generation
Instant Code Reverse and Instant Code Generation perform opposite transformations.
| Capability | Transformation | Purpose |
|---|---|---|
| Instant Code Reverse | Java code → UML model | Understand and visualize existing implementations. |
| Instant Code Generation | UML model → Java code | Generate Java implementation files from UML models. |
| Java Round-Trip Engineering | Java code ↔ UML model | Support code and model updating through a coordinated engineering workflow. |
Instant Code Reverse should not be confused with Java Round-Trip Engineering. Instant Reverse is intended for one-time reverse engineering, whereas round-trip engineering provides a separate workflow for maintaining relationships between source code and UML models.
Why Is Instant Code Reverse Important?
Instant Code Reverse helps developers understand existing Java applications by turning implementation structures into visual UML representations. It reduces the effort required to document software, analyze dependencies, and understand unfamiliar codebases.
Understand Existing Java Applications
When developers join an established project, they often need to understand its architecture before making changes. Reading individual Java files may reveal the implementation of particular classes, but understanding the relationships across hundreds of classes can be considerably more difficult.
Instant Code Reverse helps by extracting Java classes and their structural relationships into a UML model. Developers can then visualize these structures using class and package diagrams.
Reduce Manual UML Modeling
Creating UML diagrams manually from an existing implementation requires developers to inspect source files, identify classes, record attributes and operations, and determine relationships between elements.
Instant Code Reverse automates much of this initial extraction process. Developers can concentrate on reviewing and refining the resulting models rather than recreating every class manually.
Document Legacy Systems
Legacy applications frequently lack complete or up-to-date design documentation. Original developers may have left the project, and the implementation may have evolved beyond the original design.
By reversing the available Java implementation, teams can establish a visual representation of the existing software structure and use it as a starting point for technical documentation and architectural analysis.
Explore Third-Party Java Libraries
Instant Code Reverse can also be used to inspect external Java libraries. For example, developers can reverse a JAR file or a collection of compiled Java classes into a model and explore the resulting class structures.
This is particularly useful when investigating unfamiliar libraries, understanding inheritance hierarchies, or examining how application code relates to external components.
Identify Dependencies and Relationships
Visual representations of class structures make it easier to investigate relationships between software elements. Developers can examine inheritance, interface realization, associations, and package organization in the resulting UML models and diagrams.
Improve Software Maintenance
When modifying an existing application, understanding its current structure helps reduce the risk of unintended changes. A reversed UML model provides a visual reference for examining classes and their relationships before developers modify the implementation.
What Happens Without Instant Code Reverse?
Without automated reverse engineering, developers typically need to perform several tasks manually:
- Inspect individual Java source files and compiled classes.
- Identify the classes and interfaces contained in the application.
- Extract class attributes and operations.
- Determine inheritance and implementation relationships.
- Identify associations and package structures.
- Manually construct UML diagrams.
- Repeat the process when the documentation needs to be recreated or expanded.
These activities consume time and introduce opportunities for inconsistencies between the implementation and its documentation. Instant Code Reverse provides a faster starting point for producing a structural model from existing Java resources.
Edition and Availability
Instant Code Reverse: Java is available in Visual Paradigm Desktop Standard Edition and above.
| Visual Paradigm Desktop Edition | Instant Code Reverse |
|---|---|
| Community | Not included |
| Modeler | Not included |
| Standard | Included |
| Professional | Included |
| Enterprise | Included |
This availability is consistent with Visual Paradigm’s published edition comparison and Instant Reverse documentation. Consult the Visual Paradigm edition comparison for the latest licensing information.
Note: Edition availability can change between product releases. Users should verify the current edition matrix if they are evaluating an older installation or a particular license configuration.
Supported Java Input Types
Instant Code Reverse supports several ways of supplying Java resources. Developers can reverse source code or compiled Java classes, depending on the available project files.
Java Source Files and Source Folders
Developers can provide a folder containing Java source files. Visual Paradigm analyzes the supplied source resources and extracts the recognizable Java class structures.
This is useful when the original project source code is available, such as an application project maintained in an IDE or a source repository.
ZIP Archives Containing Java Source
Developers can provide a ZIP archive containing Java source files instead of extracting the archive manually into a folder first.
This is useful when source code is distributed as a compressed archive or when working with a packaged collection of Java source files.
Compiled Java Class Folders
Instant Code Reverse can also process folders containing compiled Java class files. This allows developers to investigate Java applications even when the original source files are unavailable but compiled classes can be accessed.
JAR Files
Java Archive (JAR) files can be supplied directly as reverse engineering inputs. This is particularly useful when analyzing reusable libraries or external dependencies distributed in JAR format.
| Input Type | Description | Typical Use Case |
|---|---|---|
| Java source folder | A directory containing Java source files. | Reverse an existing Java application. |
| Java source ZIP | A ZIP archive containing Java source files. | Reverse a compressed source distribution. |
| Java class folder | A directory containing compiled Java class files. | Analyze compiled application classes. |
| JAR file | A Java Archive containing compiled Java resources. | Explore external Java libraries. |
Visual Paradigm allows multiple source paths to be added to the same reverse engineering operation. Different input types can also be combined, such as a JAR file and a Java source folder.
Instant Code Reverse: Java Functionality Breakdown
Instant Code Reverse provides several capabilities for importing Java resources, controlling the reverse engineering process, organizing reversed model elements, and generating UML diagrams.
Java Language Selection
The Language setting identifies the programming language that Visual Paradigm should process. For Java reverse engineering, select Java.
This tells Visual Paradigm to interpret the supplied resources as Java source or compiled Java classes.
Adding Multiple Source Paths
The Source Paths list contains the Java resources selected for reverse engineering.
Developers can add multiple paths to one operation rather than reversing each source location separately.
This capability is useful when a Java application is distributed across several source directories or when application classes depend on external libraries.
Adding JAR Files
The Add Jars option allows developers to specify Java Archive files as reverse engineering inputs.
JAR files are particularly useful for analyzing compiled Java libraries and dependencies without requiring their original source directories.
Adding Class Folders
The Add class folder option allows developers to select directories containing compiled Java classes.
This provides a way to reverse engineer compiled Java resources directly.
Adding ZIP Archives
The Add zips option allows developers to specify compressed ZIP archives containing Java source files.
Visual Paradigm can process the source resources inside the archive without requiring developers to add each Java file individually.
Adding Source Folders
The Add source folder option allows developers to select directories containing Java source files.
This is a convenient approach when working with an existing Java project whose source code is already organized into packages and directories.
Setting the Target Model
The Set model option allows developers to specify the model in which reversed UML classes should be placed.
A model acts as a container for model elements in Visual Paradigm. By specifying a target model, developers can control where the reversed classes are organized within the project.
This is useful when maintaining separate model areas for different applications, libraries, subsystems, or implementation components.
Removing Source Paths
The Remove option removes selected entries from the Source Paths list.
This allows developers to correct an input selection before starting the reverse engineering operation.
Changing Source Path Order
The Up and Down options change the order of selected source paths in the Source Paths list.
These options control the order in which the listed paths are processed. Changing their order does not change the resulting UML classes themselves.
Reverse Source on Demand
Reverse source on demand is an important option for working with large Java codebases.
When this option is enabled, Visual Paradigm creates indexes of the supplied source resources rather than immediately converting all of them into UML model elements.
The indexed resources appear in the Class Repository, where developers can selectively reverse the classes they actually need.
This approach can significantly reduce initial processing time when dealing with large Java libraries or extensive source archives.
Example: A developer wants to inspect one class from the Java Development Kit source archive, which contains a very large number of Java files. Instead of immediately reversing the entire archive, the developer can enable Reverse source on demand, locate the required class in the Class Repository, and reverse only the selected resource.
On-demand reverse engineering is specifically documented as a Java capability.
Reverse to Diagram
The Reverse to diagram option allows Visual Paradigm to analyze the supplied Java resources and form UML diagrams during the reverse engineering process.
This can save additional work when developers want to visualize the reversed structures immediately rather than creating diagrams manually afterward.
Class Repository Integration
After reverse engineering, Visual Paradigm presents the reversed classes or indexed resources in the Class Repository.
The Class Repository provides a way to browse and access the reversed Java resources. When on-demand reverse engineering is used, it also provides the index tree from which developers can selectively reverse individual resources.
Class Diagram Generation
Visual Paradigm can form a UML class diagram from reversed Java classes.
Developers can select the classes to include and configure which relationships and structural details should appear in the diagram.
Package Diagram Generation
Instant Reverse also supports generating UML package diagrams from Java source resources.
A package diagram represents Java package organization and the relationships between packages. It is useful for understanding the high-level organization of a Java application.
Class Diagram Generation Options
When forming a class diagram from reversed Java classes, Visual Paradigm provides options for selecting classes, displaying relationships, and controlling how class information is presented.
Class Selection
The Select Class area displays the available reversed classes in a tree structure.
Developers must select at least one class before forming a class diagram.
It is not always necessary or desirable to include every class in a single diagram. Large class collections can make diagrams difficult to understand and may increase diagram generation time.
For better readability, select classes relevant to the specific subsystem or analysis task.
Show Superclasses
Show superclasses controls whether the new class diagram includes generalization relationships between selected classes and their superclasses.
Enabling this option helps developers understand the inheritance hierarchy above the selected classes.
Show Subclasses
Show subclasses controls whether the diagram includes generalization relationships between selected classes and their subclasses.
This helps developers identify the classes that inherit from a selected class.
Show Suppliers (Interface)
Show suppliers (interface) controls whether interface realization relationships are displayed between selected elements and their supplier interfaces.
This is useful for understanding which interfaces a class depends on or implements.
Show Clients
Show clients controls whether the diagram displays realization relationships involving classes that implement the selected interfaces.
This helps developers inspect the implementation structure of interface-based designs.
Show Navigable Classes
Show navigable classes controls whether association relationships involving the navigable target classes of selected elements are included in the new diagram.
This helps developers investigate the classes that selected elements can navigate to through associations.
Show Non-Navigable Classes
Show non-navigable classes controls whether association relationships involving non-navigable source classes are displayed.
This provides additional context about association structures that may otherwise be omitted from a focused diagram.
Show Containers
Show containers controls whether the diagram includes the containers of selected elements, such as their parent packages.
This is useful when developers want to understand how classes are organized within the application structure.
Show Residents
Show residents controls whether the diagram includes elements contained within the selected containers.
Visual Paradigm provides different levels of detail for displaying residents:
- Single level: Displays one level of residents in the new diagram.
- All levels in single diagram: Displays residents across all levels in one diagram.
- All levels in sub diagrams: Displays residents across all levels through multiple diagrams, with each diagram representing a single level.
These options help developers control the scope and complexity of diagrams generated from large package or containment structures.
Show as Containment Relationships
Show as containment relationships controls whether containment relationships between classes are displayed as connectors in the diagram.
This provides an explicit visual representation of containment rather than relying solely on the visual grouping of elements.
Class Diagram Presentation Options
In addition to selecting the classes and relationships to display, Visual Paradigm provides presentation settings that control the amount of information shown inside class shapes and how type names are presented.
Attribute Options
Attribute options control the visibility of class attributes in the generated diagram.
| Option | Description |
|---|---|
| Show all | Displays all attributes of the classes in the diagram. |
| Public only | Displays only public attributes. |
| Hide all | Hides all class attributes. |
| Initial values | Displays the initial values of class attributes. |
These options allow developers to balance the level of implementation detail against diagram readability.
Operation Options
Operation options control the visibility of class operations in the generated diagram.
| Option | Description |
|---|---|
| Show all | Displays all operations of the classes in the diagram. |
| Public only | Displays only public operations. |
| Hide all | Hides all class operations. |
| Initial values | Provides the documented presentation option for operation details; its exact behavior should be checked against the installed product version. |
For architectural analysis, showing all operations may be useful. For high-level design documentation, showing only public operations or hiding operations can produce cleaner diagrams.
Type Options
Type options determine how type names are displayed in the generated UML class diagram.
| Option | Description |
|---|---|
| Fully-qualified | Displays the fully qualified names of types. |
| Name only | Displays only the type names without their full qualification. |
| Relative | Displays type names relative to the current class. |
Fully qualified names provide additional context when classes with identical simple names exist in different packages. Name only and Relative can make diagrams more compact.
Java Reverse Engineering Project Options
Visual Paradigm also provides project-level settings that influence how Java code is represented when reversed into UML models and diagrams.
Show Packages/Owner When Reverse to Diagram
This setting controls how parent package information is displayed when reversed classes are visualized in a diagram.
The documented presentation choices include:
- Show All Packages: Creates package shapes to contain the classes shown in the diagram.
- Show Fully Qualified Owner: Displays the package name as a caption inside the class shape, below the class name.
This setting helps developers decide whether package information should be represented through package shapes or through fully qualified ownership information within class shapes.
Show Packages When Reverse to New Diagram
This setting controls how package information is displayed when Visual Paradigm creates a new diagram during reverse engineering.
The documented options include:
- Diagram Package Header: Uses the package name as the header of the new diagram.
- Package Shape: Represents packages using package shapes, following the configuration specified by Show Packages/Owner When Reverse to Diagram.
Reverse Java Getter/Setter to
This setting controls how Java getter and setter methods are represented during code reversal.
Depending on the selected configuration, Visual Paradigm can represent getter and setter functionality as attributes with getter and/or setter properties, or as getter and setter operations.
This is useful because Java classes commonly implement encapsulation through private attributes and public accessor methods. Developers can choose a representation that better matches their preferred UML modeling style.
Create Shape for Parent Model of Dragged Class/Package
This setting controls whether Visual Paradigm automatically creates a shape for the parent model when a class or package is dragged from a repository tree onto a diagram.
When enabled, the parent container can also be represented, helping preserve the organizational context of the selected model element.
The documented default value is false.
Calculate Generalization and Realization
This setting controls the calculation of generalization and realization relationships during reverse engineering.
It is useful when developers want Visual Paradigm to calculate these relationships as part of the reverse engineering process.
The documented default value is false.
Reverse Operation’s Implementation
This setting controls the reverse engineering of operation implementation information.
It is a separate project option from the visibility settings used when forming class diagrams. Developers should distinguish between reversing implementation information into the model and deciding whether operations are displayed in a particular diagram.
The documented default value is false.
How to Use Instant Code Reverse: Java
To reverse engineer Java code in Visual Paradigm Desktop, open a project, access Instant Reverse, select Java as the language, add the required source resources, configure the reverse engineering options, and start the operation.
Reverse Engineer Java Source Code
Follow these steps to reverse engineer Java source files into UML models.
- Open a Visual Paradigm project. Start Visual Paradigm Desktop and open an existing project or create a new project to contain the reversed UML models.
- Open Instant Reverse. Select Tools > Code > Instant Reverse… from the application toolbar.
- Select Java. In the Instant Reverse window, select Java from the Language selection.
- Add Java source resources. Click Add source folder and select the folder containing the Java source files. Alternatively, use the ZIP option to select a compressed source archive.
- Configure the target model. If necessary, use Set model to specify where the reversed UML classes should be placed.
- Configure reverse engineering behavior. Decide whether to enable Reverse source on demand and whether to use Reverse to diagram, depending on the intended workflow.
- Start reverse engineering. Click OK to begin processing the selected resources.
- Inspect the reversed resources. When processing finishes, Visual Paradigm displays the reversed classes or indexed resources in the Class Repository.
- Create a UML diagram. If the Form Diagram window appears, select the required classes and configure the diagram and presentation options.
- Review the result. Inspect the resulting UML classes and diagrams, and save the Visual Paradigm project.
Reverse Engineer a JAR File
To inspect compiled Java resources packaged in a JAR file:
- Open a Visual Paradigm project.
- Select Tools > Code > Instant Reverse….
- Select Java as the language.
- Click Add Jars.
- Select the required JAR file.
- Configure the target model and other applicable options.
- Click OK to start reverse engineering.
- Inspect the reversed classes in the Class Repository and create diagrams as required.
Reverse Engineer Compiled Java Classes
If the original Java source files are unavailable, developers can use compiled Java class folders instead.
- Open Instant Reverse through Tools > Code > Instant Reverse….
- Select Java.
- Click Add class folder.
- Select the folder containing the compiled Java classes.
- Configure the applicable reverse engineering options.
- Click OK to process the selected resources.
- Review the resulting classes in the Class Repository.
Reverse Engineer Multiple Java Resources
Instant Reverse supports multiple source paths in a single operation. This is useful when an application consists of several source directories and external libraries.
- Open the Instant Reverse window.
- Select Java as the language.
- Add the first Java source folder or archive.
- Use Add Jars, Add class folder, Add zips, or Add source folder to include additional resources.
- Review the complete Source Paths list.
- Use Up and Down to change the processing order if necessary.
- Use Remove to remove any unwanted entries.
- Configure the remaining options and click OK.
Adding multiple paths allows Visual Paradigm to process different Java resources together. The order of the paths controls processing order but does not independently change the resulting UML classes.
How to Use On-Demand Java Reverse Engineering
On-demand reverse engineering is designed for large Java codebases where immediately reversing every available class would require considerable processing time.
Instead of converting all indexed resources into UML classes immediately, Visual Paradigm first builds an index tree. Developers can then select individual resources and reverse only the classes they need.
Enable On-Demand Reverse Engineering
- Open a project in Visual Paradigm Desktop.
- Select Tools > Code > Instant Reverse….
- Select Java as the language.
- Add the Java source folder, ZIP archive, JAR file, or other supported resource.
- Make sure Reverse source on demand is selected.
- Click OK to begin indexing the resources.
- After processing, open the Class Repository and locate the indexed resource tree.
Reverse Selected Classes from the Index
- Locate the required indexed resources in the Class Repository.
- Select the class or classes that need to be converted into UML model elements.
- Right-click the selected resource.
- Select Reverse Resources to from the context menu.
- Choose either New Class Diagram or Class Repository as the destination.
- Review the resulting reversed UML classes and diagram, where applicable.
New Class Diagram vs. Class Repository
| Destination | Result | When to Use |
|---|---|---|
| New Class Diagram | Reverses the selected resources into UML classes and creates a class diagram containing them. | When the objective is to visualize the selected classes immediately. |
| Class Repository | Reverses the selected resources into UML classes in the repository. | When the objective is to add classes to the model for further organization or diagram creation. |
Why Use On-Demand Reverse Engineering?
On-demand reverse engineering is especially useful when analyzing large Java libraries, framework source archives, or extensive applications containing many classes.
For example, when examining a large JDK source archive, developers may only need to reverse a small number of classes. Indexing the archive first allows them to locate the relevant resources without immediately generating UML models for the entire archive.
Important: On-demand reverse engineering is documented as being available specifically for Java. It should not be assumed to work identically for other supported Instant Reverse languages.
How to Form UML Class Diagrams from Reversed Java Code
After reversing Java resources, developers can generate UML class diagrams to visualize the resulting class structures and relationships.
Select Classes to Include
The Form Diagram window provides a tree of reversed classes. Select at least one class to create a diagram.
For large applications, it is generally preferable to create several focused diagrams rather than place every available class into one diagram.
Configure Relationships
Use the relationship options to control which surrounding classes and relationships should appear in the diagram.
For example, when analyzing a particular class, developers may choose to show its superclasses, subclasses, supplier interfaces, client classes, and associated classes.
Configure Package and Containment Information
Use the container and resident options to control whether parent packages and contained elements are displayed.
This is useful when examining the organization of a subsystem or investigating classes distributed across nested packages.
Configure Class Details
Use the Attribute options and Operation options to determine how much class information should appear inside the class shapes.
For example, a high-level architecture diagram may hide attributes and operations, while an implementation-oriented diagram may display all available attributes and operations.
Configure Type Names
Select the appropriate Type option to control whether types are displayed using fully qualified names, simple names, or names relative to the current class.
After configuring the selections and presentation options, confirm the operation to form the UML class diagram.
Reverse Engineer Java Package Diagrams
In addition to UML class diagrams, Visual Paradigm supports reverse engineering Java package structures into UML package diagrams.
A package diagram provides a higher-level view of how Java packages are organized and how they relate to one another.
How to Reverse Engineer a Package Diagram
- Open a project in Visual Paradigm Desktop.
- Select Tools > Code > Instant Reverse….
- Select Java as the language.
- Specify the Java source file or folder containing the resources to reverse.
- Select Package Diagram for the Reverse To setting.
- Click OK to start reverse engineering.
- Review the resulting UML package diagram.
When Should You Use a Package Diagram?
Package diagrams are useful when developers need to understand the organization of a Java application at a higher level than individual classes.
Typical use cases include:
- Understanding the package structure of an unfamiliar application.
- Identifying relationships between application packages.
- Documenting the organization of a legacy Java system.
- Reviewing subsystem boundaries and package dependencies.
- Preparing high-level architectural documentation.
Reverse Engineer Java Code into Sequence Diagrams
Visual Paradigm also provides a separate Java reverse engineering workflow for generating UML sequence diagrams from Java source code.
Unlike class diagram reverse engineering, which focuses on static class structures and relationships, Java-to-sequence-diagram reverse engineering analyzes an operation’s implementation and method invocations to produce a visual representation of interactions.
This is useful when developers want to understand how an operation invokes other methods and how objects participate in a particular execution flow.
How to Generate a Sequence Diagram from Java
- Open a project in Visual Paradigm Desktop.
- Select Tools > Code > Instant Reverse Java to Sequence Diagram….
- In the Instant Reverse window, add the Java source folder or ZIP archive.
- Make sure the supplied resources include the source files of the classes required for analyzing method invocation traces.
- Click Next.
- Expand the class tree and select the class operation whose implementation should be analyzed.
- Click Next.
- In the Choose Diagram page, select Create new sequence diagram and enter a diagram name, or select Select an existing sequence diagram and choose the target diagram.
- Click Finish to generate the sequence diagram.
Analyze Method Invocations
Visual Paradigm analyzes the selected operation’s Java code body and identifies method invocations that can be represented as sequence messages.
This allows developers to examine the interaction flow associated with the selected operation without manually constructing every message in a sequence diagram.
Reverse Deeper Levels of Code Details
The initial sequence diagram generation does not automatically drill into every method call indefinitely. Instead, it focuses on the operation selected during the reverse engineering process.
To investigate a deeper level of interaction, right-click the relevant sequence message and select Instant Reverse Java Source from the context menu.
This provides a way to explore the implementation behind a particular method invocation and extend the analysis into additional interaction details.
Class Diagrams vs. Sequence Diagrams
| Aspect | Class Diagram Reverse Engineering | Sequence Diagram Reverse Engineering |
|---|---|---|
| Primary focus | Static software structure. | Interactions and method invocations. |
| Input | Java source or compiled Java resources. | Java source files. |
| Result | UML classes and structural relationships. | UML sequence diagram. |
| Selection | Classes and relationships. | A specific class operation. |
| Typical purpose | Understand architecture and class organization. | Understand an operation’s interaction flow. |
Important: Java-to-sequence-diagram reverse engineering is a separate workflow from the standard Java Instant Reverse operation. The sequence diagram workflow requires Java source resources and an operation to analyze.
Practical Use Cases
Understanding an Unfamiliar Java Application
When developers inherit an existing Java application, they can reverse its source folders into UML class models and diagrams to understand the classes, inheritance hierarchies, and relationships involved.
Documenting Legacy Software
Development teams can use Instant Reverse to create a starting point for documenting older Java systems whose original design documents are missing or outdated.
Analyzing External Java Libraries
When working with an unfamiliar JAR file, developers can reverse the compiled classes and inspect their relationships through the Class Repository and UML diagrams.
Investigating Large Java Frameworks
On-demand reverse engineering is useful when developers need to inspect only selected classes from a large source archive or framework.
Reviewing Package Dependencies
Generating package diagrams allows developers to examine the organization and relationships of packages within a Java application.
Understanding Method Execution Flow
The Java-to-sequence-diagram workflow allows developers to analyze a selected operation and visualize the method invocations involved in its implementation.
Preparing for Application Refactoring
Before refactoring an existing Java application, developers can reverse its implementation into UML models to establish a clearer understanding of the current design and dependencies.
Best Practices for Java Reverse Engineering
Start with the Relevant Source Scope
Avoid reversing an unnecessarily large codebase when the objective is to understand a specific subsystem. Start with the relevant Java resources and expand the scope when additional classes or dependencies are needed.
Use On-Demand Reverse for Large Libraries
When working with large Java archives, enable Reverse source on demand to create an index first and selectively reverse the classes that are relevant to the analysis.
Organize Reversed Classes into Appropriate Models
Use Set model to specify an appropriate destination for reversed classes. Organizing classes by subsystem or application area can make larger modeling projects easier to maintain.
Keep Diagrams Focused
Do not automatically include every available class and relationship in one diagram. Select the elements relevant to the analysis and use multiple diagrams when necessary.
Choose Appropriate Presentation Options
Use Attribute options, Operation options, and Type options to produce diagrams that match their intended audience. Architectural documentation often benefits from a simpler presentation, whereas implementation analysis may require more detailed class information.
Understand the Difference Between Reverse and Round-Trip Engineering
Instant Reverse is intended for one-time code-to-model conversion. If the objective is to maintain and update an existing UML model and its corresponding Java source code, investigate the dedicated Java Round-Trip Engineering workflow instead.
Review the Reversed Model
Reverse engineering produces a model from the available implementation resources. Developers should review the results, check important relationships, and verify that the selected classes and diagrams represent the intended scope of analysis.
Important Considerations and Limitations
Instant Reverse Is Not Continuous Synchronization
Instant Reverse should not be treated as a continuously synchronized connection between Java source code and UML models. Running the operation again can replace duplicate model elements rather than merge implementation changes into an existing model in the same way as round-trip engineering.
For workflows that require coordinated code and model updates, use Visual Paradigm’s Java Round-Trip Engineering functionality.
Reverse Engineering Does Not Automatically Produce Every Diagram Type
The standard Java Instant Reverse workflow focuses on UML class models and supports class and package diagram generation. Sequence diagram generation is provided through its own Java reverse engineering workflow.
Large Codebases May Require Selective Processing
Reversing a very large collection of Java classes can require considerable processing time. On-demand reverse engineering provides an alternative for indexing resources and selectively converting the required classes.
Diagram Complexity Can Affect Readability
Including too many classes and relationships in a single diagram can make the result difficult to understand. Use the class selection and presentation options to control the amount of information displayed.
Compiled Classes and Source Code Are Different Inputs
Visual Paradigm supports both Java source resources and compiled Java resources. However, compiled classes do not provide the original Java source text. Developers should select the appropriate input type based on the information they need to inspect.
Reverse Engineering Does Not Replace Design Review
A reversed UML model represents structures extracted from the supplied implementation. It does not automatically establish whether the original architecture is well-designed or whether the implementation follows recommended software engineering practices. Developers should review and interpret the resulting model.
Troubleshooting and Frequently Encountered Issues
Why Is Instant Reverse Not Available in My Visual Paradigm Edition?
Instant Reverse requires Visual Paradigm Desktop Standard Edition or above. It is not included in Community or Modeler Edition according to the published edition comparison.
Check your installed product edition and license before troubleshooting the menu availability.
Why Are Some Java Classes Missing from the Result?
Check whether the selected source paths include the Java resources you intend to reverse. If the application is distributed across multiple folders or depends on external libraries, add the relevant paths to the Source Paths list.
Also check whether Reverse source on demand is enabled. When this option is selected, resources are indexed first rather than immediately converted into UML classes. In this case, the required classes must be reversed manually from the Class Repository.
Why Does Instant Reverse Display an Index Tree Instead of UML Classes?
This is expected behavior when Reverse source on demand is enabled. Visual Paradigm creates indexes of the supplied Java resources instead of immediately reversing every class.
To obtain UML classes, locate the required resources in the Class Repository, right-click them, and select Reverse Resources to either New Class Diagram or Class Repository.
Why Does Reversing a Large Java Archive Take a Long Time?
Large Java archives may contain many classes and relationships. Reversing all of them immediately can require considerable processing time.
Enable Reverse source on demand to index the resources first and reverse only the classes needed for the current task.
Why Is the Generated Class Diagram Too Large?
The selected class scope or relationship options may be too broad. Reduce the number of selected classes and disable unnecessary relationship options. You can also hide attributes or operations to improve readability.
Why Are Package Names Displayed Inside Class Shapes?
Check the Show Packages/Owner When Reverse to Diagram project option. If Show Fully Qualified Owner is selected, package names are displayed as captions inside class shapes. Select Show All Packages if you prefer package shapes to contain the classes.
Why Are Getter and Setter Methods Represented as Operations?
Check the Reverse Java Getter/Setter to project option. This setting controls whether getter and setter functionality is represented through attributes with getter/setter properties or through operations.
Why Are No Operations Available When Generating a Java Sequence Diagram?
The Java-to-sequence-diagram workflow requires an operation whose implementation can be analyzed. Make sure the supplied source resources contain the relevant class and its method implementation.
Also make sure that the source folders include all classes required for analyzing the method invocation traces.
Why Does a Generated Sequence Diagram Show Only One Level of Method Calls?
Visual Paradigm does not automatically drill into method calls indefinitely during the initial sequence diagram generation. It focuses on the operation selected in the wizard.
To inspect deeper implementation details, right-click the relevant sequence message and select Instant Reverse Java Source.
Does Instant Reverse Update an Existing UML Model Automatically?
Instant Reverse is a one-time reverse engineering operation rather than a continuously synchronized code-model workflow. For coordinated updating between Java source and UML models, use Java Round-Trip Engineering.
Instant Reverse vs. Java Round-Trip Engineering
Both Instant Reverse and Java Round-Trip Engineering can transform Java source code into UML models. However, they are designed for different purposes.
Instant Reverse
Instant Reverse is intended to convert a snapshot of Java resources into UML models. It is particularly suitable for inspecting existing code, exploring external libraries, and producing an initial model from an implementation.
Java Round-Trip Engineering
Java Round-Trip Engineering supports a more coordinated relationship between Java source code and UML models. Developers can generate Java code from UML models and reverse Java changes into the corresponding model through the round-trip workflow.
This is more appropriate when maintaining an implementation and its associated design model over time.
| Comparison | Instant Reverse | Java Round-Trip Engineering |
|---|---|---|
| Primary purpose | Reverse Java resources into UML models. | Maintain a coordinated relationship between Java code and UML models. |
| Code-to-model | Supported. | Supported. |
| Model-to-code | Not its purpose. | Supported. |
| Typical use | Code analysis, exploration, and documentation. | Ongoing implementation and model maintenance. |
| Update behavior | One-time reverse operation; duplicate models may be overwritten. | Provides a dedicated updating and merging workflow. |
Choosing the appropriate capability depends on the development objective. Use Instant Reverse when the main requirement is to understand or document existing Java code. Use Java Round-Trip Engineering when the model and implementation need to evolve together.
Frequently Asked Questions
What is Instant Code Reverse: Java in Visual Paradigm?
Instant Code Reverse: Java is a reverse engineering feature in Visual Paradigm Desktop that converts Java source code and compiled Java classes into UML class models. Developers can use it to generate class and package diagrams and explore existing Java application structures.
Can Visual Paradigm generate UML class diagrams from Java code?
Yes. Visual Paradigm can reverse Java source files and compiled Java resources into UML class models. Developers can then select the reversed classes and form UML class diagrams.
Can I reverse Java source code without manually creating UML classes?
Yes. Instant Code Reverse automatically extracts recognizable Java class structures into UML model elements, reducing the need to create classes manually.
Which Java file formats are supported by Instant Reverse?
Visual Paradigm supports Java source folders, ZIP archives containing Java source, compiled Java class folders, and JAR files.
Can I reverse a JAR file into UML?
Yes. Select Java as the language in the Instant Reverse window and use Add Jars to add the JAR file. Visual Paradigm can reverse its available Java class resources into UML models.
Can I reverse compiled Java classes without source code?
Yes. Instant Reverse supports compiled Java class folders and JAR files. Original Java source files are not required for this input workflow.
Can I reverse multiple Java source folders at once?
Yes. You can add multiple source paths to the Source Paths list, including different supported Java input types, and process them together.
What is Reverse source on demand?
Reverse source on demand is an option that indexes Java resources rather than immediately converting every resource into UML classes. Developers can browse the resulting index tree in the Class Repository and selectively reverse the required classes.
Is on-demand reverse engineering available for all programming languages?
No. Visual Paradigm’s documentation specifically identifies on-demand reverse engineering as a Java capability.
What is the difference between Reverse source on demand and normal reverse engineering?
Normal reverse engineering converts the supplied resources into UML classes immediately. Reverse source on demand creates indexes first and allows developers to reverse selected classes later.
Can Instant Reverse generate a package diagram from Java code?
Yes. Select Java as the language and choose Package Diagram in the Reverse To setting to generate a UML package diagram from Java source resources.
Can Instant Reverse generate a UML sequence diagram from Java code?
Yes. Visual Paradigm provides a separate Instant Reverse Java to Sequence Diagram workflow that analyzes a selected Java operation and its method invocations to form a sequence diagram.
Can I select a specific Java method for sequence diagram generation?
Yes. The sequence diagram wizard allows developers to browse the available classes and select the operation whose implementation should be analyzed.
Can I reverse deeper method calls in a generated sequence diagram?
Yes. Right-click the relevant sequence message and select Instant Reverse Java Source to explore deeper implementation details.
Can I reverse only selected Java classes?
Yes. Enable Reverse source on demand, locate the required classes in the Class Repository, and selectively reverse the resources you need.
Can I choose where reversed UML classes are stored?
Yes. Use Set model in the Instant Reverse window to specify the target model for the reversed UML classes.
Can I control which attributes appear in generated class diagrams?
Yes. Attribute options allow you to show all attributes, show public attributes only, hide attributes, or display initial values.
Can I control which operations appear in generated class diagrams?
Yes. Operation options allow you to show all operations, show public operations only, or hide operations.
Can I display fully qualified Java type names?
Yes. Select Fully-qualified under Type options when configuring the class diagram presentation.
Can I control how Java getter and setter methods are represented in UML?
Yes. The Reverse Java Getter/Setter to project option controls whether getter and setter functionality is represented as attributes with accessor properties or as operations.
Does Instant Reverse preserve the original Java source code?
Instant Reverse is a code-to-model operation. It reads the supplied Java resources and creates UML model elements. It is not intended to modify or regenerate the original Java source files.
Does Instant Reverse synchronize Java code and UML automatically?
No. Instant Reverse does not provide continuous synchronization. Use Java Round-Trip Engineering when coordinated code and model updates are required.
Does Instant Reverse merge Java code changes into an existing UML model?
Instant Reverse is intended for one-time reverse engineering and may overwrite duplicate model elements when executed again. For a merging and updating workflow, use Java Round-Trip Engineering.
Which Visual Paradigm edition supports Instant Code Reverse: Java?
Instant Code Reverse is available in Standard Edition, Professional Edition, and Enterprise Edition. It is not included in Community Edition or Modeler Edition according to the published edition comparison.
Is Instant Code Reverse available in Visual Paradigm Online?
Instant Code Reverse: Java is documented as a Visual Paradigm Desktop code engineering capability. Users should consult the product feature and edition documentation for the availability of equivalent functionality in other Visual Paradigm products.
Summary
Instant Code Reverse: Java in Visual Paradigm Desktop provides a practical way to transform existing Java implementations into UML models. It supports Java source folders, ZIP archives, compiled class folders, and JAR files, allowing developers to analyze different forms of Java resources.
Beyond basic class extraction, the feature provides on-demand reverse engineering, target model selection, class and package diagram generation, relationship selection, and diagram presentation controls. A separate Java-to-sequence-diagram workflow also allows developers to visualize method invocation flows from selected Java operations.
By turning existing Java code into visual models, Instant Code Reverse helps developers understand unfamiliar systems, explore dependencies, document legacy applications, and establish a clearer foundation for software maintenance and architectural analysis.
VISUAL PARADIGM