Reverse engineering options 3 page (Java Code Reverser)
This page allows you to specify folder to package mappings, which determine where the code files selected for reverse engineering are created in the Model. In addition, this page is used to specify compiler search paths for dependent code files, such as external libraries.
For information about reverse engineering Java code, click here
Specifying mappings for reverse engineering code files
Having specified code files to reverse engineer, you must now map those files to target packages in the Model. You do this by mapping a folder that contains the files selected for reverse engineering (either directly or through any of the folder's subfolders) to a Package in the Model. By default, the Root Directory you specified for your project is mapped to the Root Object you specified in the Model, even though this mapping is not listed:
If the Root Directory owns all of the code files selected for reverse engineering (either directly or through any of the Root Directory's subfolders), all the code files will be reverse engineered because of the default Root Directory to Root Object mapping.
If you have selected files for reverse engineering that are not owned by the root directory or any of its sub folders, you must map folders to Packages in the Model so that each code file selected for reverse engineering is a descendent of a folder that is mapped to a Package.
* 
You cannot map any parent or subfolders of the root directory to the Model or a Package.
Each code file you select for reverse engineering is reverse engineered only if their owning folder or one of the owning folder's parent folders is mapped to a Package (either the Model itself or a Package in the Model).
Specifying search paths that contain dependent files
The code files you have selected for reverse engineering may be dependent on other code files, such as library files. The Reverser parser needs to know the paths, zip files or jar files in which dependent code files reside to correctly parse the code files selected for reverse engineering.
You must specify the compiler search paths and optionally map those paths to Packages in the Model:
If you do not want to reverse engineer any code files used in a search path, do not map the search path to a Package in the Model.
If you want to reverse engineer any code files used in a search path, map the search path to a Package in the Model.
* 
You must ensure that the Library Search Path check box is selected for each path. If the Library Search Path check box is cleared and the path is not mapped to a package, the path is ignored.
You can quickly add CLASSPATH environment variable paths through the Add Include Dirs button. If the CLASSPATH environment variable does not reference JDK information, the Add Include Dirs button adds the path of the rt.jar file.
Order of the mappings and search paths
The Reverser parser searches the paths in the order they appear in the list, so ensure that the order is correct.
To map a path, zip file or jar file to a package:
1. Click the Add Mapping button.
2. Select the required folder, zip file or jar file:
To select a folder, click the Select Directory button, select the required directory, and then click OK.
To select a Javazip orjar file, click the Select Java Zip/Jar File button, select the required file, and then click OK.
* 
If you want to view the content of a Java zip or jar file, from the Add Directory/Library & Mapping dialog, double-click the box in which the Java zip or jar file path and name is displayed.
3. Clear the Library Search Path check box.
4. Select the Map to Package check box, and then select the required Model or Package.
5. Click Insert
To add a compiler search path, zip file or jar file without reverse engineering used files:
1. Click the Add Mapping button.
2. Select the required folder, zip file or jar file:
To select a folder, click the Select Directory button, select the required directory, and then click OK.
To select a Javazip orjar file, click the Select Java Zip/Jar File button, select the required file, and then click OK.
* 
If you want to view the content of a Java zip or jar file, from the Add Directory/Library & Mapping dialog, double-click the box in which the Java zip or jar file path and name is displayed.
3. Clear the Library Search Path check box.
4. Select the Map to Package check box.
5. Click Insert.
To add a compiler search path, zip file or jar file and reverse engineer used files:
1. Click the Add Mapping button.
2. Select the required folder, zip file or jar file:
To select a folder, click the Select Directory button, select the required directory, and then click OK.
To select a Javazip orjar file, click the Select Java Zip/Jar File button, select the required file, and then click OK.
3. Clear the Library Search Path check box.
4. Select the Map to Package check box, and then select the required Model or Package.
5. Click Insert
To move a mapping or search path up or down the list:
1. Select the mapping you want to move.
2. Use the and buttons to move the mapping to the required position.
To change a mapping or search path:
1. Select the mapping or search path you want to change.
2. Click the Edit Mapping button.
3. Make the required changes, and then click Update
4. Alternatively, you can double-click a mapping or search path in the list to change it.
To delete a mapping or search path:
1. Select the mapping or search path you want to delete.
2. Click the Delete Mapping button.
To view the contents of a zip or jar file:
1. Select the zip or jar file whose contents you want to view.
2. Click the View zip/jar File Contents
Was this helpful?