The source reverse command allows you to reverse the classes, associations , method signatures and body of .java files.

Before beginning

Ensure you have selected the right Java version in the module parameters.

  • The "Java 11" mode allows you to reverse Java 11 or older sources.

  • The "Java 8" mode allows you to reverse only Java 8 or older sources.

The wizard

  1. Get a Java Package or a Component that will contain the reversed application

  2. Right click on the chosen element

  3. Select 'moduleJava Architect/reversegroupReverse/reversebinaryReverse Java application from binaries'

Reverse tab

reverse sources 01
Files to reverse
  1. Choose the root directory where the sources to reverse are located

  2. Select the files to reverse in the tree view. You may select a directory to select all contained .java files.

  3. Choose a Granularity:

    • Simple structural: the reverse create only classes and interfaces without their content.

    • Complete structural: attributes, associations and method signatures are also reversed

    • Complete: all methods and their body are reversed, including private ones.

Project’s jars tab

reverse sources 02
Project jars

The next window of the Wizard shows the current classpath of your project, as defined in the java module’s parameter. It is not modifiable here, but through Set up the reverse class path.

These jars won’t be reversed but they will be used to resolve references.

Tip You may want to deselect archives for which you are reversing the sources.

Reverse jars

reverse sources 03
Reverse jars

You may add here more jars to be used for references resolution that are not already in the reverse class path.

  1. Click "Reverse" to launch reverse