How to include packages with Java code generation?

General discussions about code engineering

Moderator: Moderators

Re: How to include packages with Java code generation?

Postby lonniev » Sun Dec 12, 2010 8:40 pm

A practical example of how to reverse a Java package hierarchy (i.e. an extensive collection of files and not just a single-class file) with sources that reference types in external jars would be useful. The goal is a reversed set of classes which minimizes classes in the Default package and which properly resolves references to Java's non-object types (e.g. "boolean").

The provided documentation is either poorly stated or is no longer on the nomagic sites.

The practical exercise which I am attempting is to reverse the facade of the Android APIs from ... EAD;sf=tgz using the android.jar file from /opt/android-sdk-linux_x86/platforms/android-8/android.jar

What is the recommended Code Engineering Set options and Project options to yield the optimal set of reversed Classes for this code base?
Customer Support
Customer Support
Posts: 12
Posts Rating:1
Joined: Mon Nov 01, 2010 12:53 pm

Re: How to include packages with Java code generation?

Postby egiva » Mon Dec 13, 2010 10:13 am


If you are going to reverse code only, it is worth to select Use set to import code only for the newly created Java Code engineering set. It will allow to reverse code more quicker. Property can be adjusted only in dialog which appears on creating new code engineering set.

To avoid class creation in Default package, you should specify reverse class path as precise to your compile classpath as it is possible. Go to the Options-> Project-> Code engineering-> Java Language Options-> Use Classpath and include all binary jar files which are used by your source code. If all required libraries are included, then no classes in Default package should be created.

I will submit documentation request in our bugs database and we will improve it for future releases.
Best Regards,
Egidijus Vaisnora
Customer Support
Customer Support
Posts: 37
Posts Rating:0
Joined: Tue Jan 05, 2010 6:32 am


Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests