Public Methods | |
Decompiler (Hashtable cls, AnnotationManager am, String path, String suffix) | |
Decompiler (Hashtable cls, AnnotationManager am, String path, String suffix, TypeTable tt) | |
void | decompile () |
Hashtable | getLineToAnnotationTable () |
Static Public Methods | |
void | addImports (String cls) |
Static Public Attributes | |
String | fileSuffix = ".java" |
Private Methods | |
void | dump (SootClass sc) |
String | printImports () |
void | renumber (Hashtable tbl, int offset) |
Private Attributes | |
Hashtable | classes = null |
String | outputPath = "." |
String | outFilename = "" |
DecompilerPrinter | src = new DecompilerPrinter() |
int | lineCounter |
Hashtable | lineToAnnotation = new Hashtable() |
Static Private Attributes | |
AnnotationManager | annot = null |
Vector | imports = new Vector() |
TypeTable | typeTable = null |
Decompiler package is basically the main semi-decompiler class. All components of Bandera works on Jimple-level, which format resembles the Java byte-code. Sometimes, it is preferable to make the intermediate results, like after slicing or abstraction available for user view. This is the need of Decompiler package. Moreover, we definitely need the decompiler in order to use JPF module checker since JPF input is in Java.
Why it is called a semi-decompiler? It is because of the usage of annotations in decompiling the codes. The annotation created by the compiler, JJJC, is used extensively to retrieve variable names and all sort of things so that we don't need to deal directly with the Jimple, which makes things a lot simpler.
Note that if you inspect this code, you'll see that this solution is somewhat patchy. Yes, it is because other component may inline and do some optimizing stuffs (and probably some other non-reversible actions) to the code. So, there is no way that I can cover all cases (like jumping into an if block). This is it, don't complain. If you don't like it, don't use it.
If you're interested on how the decompiler are used in Bandera, you should only resort in Decompiler class, decompile method, in particular.
Definition at line 71 of file Decompiler.java.
|
You need to supply the hashtable of compiled classes, the annotation manager, output path, and file suffix (usually
The usage is something like this: Definition at line 92 of file Decompiler.java. |
|
This is meant to add some Definition at line 113 of file Decompiler.java. Referenced by decompile().
|
|
Decompiles all the classes. See constructor's notes Definition at line 124 of file Decompiler.java. |