Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

DecompilerUtil Class Reference

List of all members.

Static Public Methods

String analyzeCondition (Stmt[] stmts, int code)
Vector dumpStmt (Stmt[] s)
Vector flattenStmts (Stmt[] stmts)
String flattenToString (Vector x)
Hashtable getAssignedVarTable ()
Hashtable getTempTable ()
boolean isAbstracted (Abstraction lt)
boolean isAllowField ()
boolean isDebugInfo ()
boolean isEmptyAnnotation (Annotation a)
boolean isJimpleID (String id)
void resetAssignedVar ()
void resetTempTable ()
void setAllowField (boolean newAllowField)
void setDebugInfo (boolean newDebugInfo)
int stmtIndex (Stmt s, Stmt[] stmts)
String stripImports (String s)

Static Public Attributes

final String gotoStr = "$.goto"

Static Private Methods

String extractCondition (Vector x)
Vector extractLHS (Vector x)
Vector extractRHS (Vector x)
String fixScrewedUpThis (String s)
int getEqPos (Vector x)
int getJimpleVarID (String str)
int getParamID (String x)
int howManyIfs (Stmt[] stmts)
boolean isAllJimpleTemp (Vector x)
boolean isAssignment (Vector x)
void replaceOccurence (Vector x, Hashtable table)

Static Private Attributes

Hashtable assignedVar = new Hashtable()
Hashtable tempTable = new Hashtable()
boolean debugInfo = false
boolean allowField = false

Detailed Description

DecompilerUtil is an auxilliary class to help the decompilation, especially in flattenning a bunch of related statements. The ones that is visible from outside is flattenStmts and analyzeCondition. Everything else is internal.
Author:
Roby Joehanes
Version:
0.4.21

Definition at line 51 of file DecompilerUtil.java.


Member Function Documentation

String DecompilerUtil::analyzeCondition Stmt   stmts[],
int   code
[inline, static]
 

This method basically flattenning condition statements in if, for (the second argument), while, and do...while. The problem is that Jimple cannot have complicated condition statements. So, conditions such as ((A && B) || C) is then divided into several if statements. Moreover, if statements usually followed by the nasty bad ugly goto which mess everythings up. Which at this very moment, I'm quite perplexed.

Definition at line 67 of file DecompilerUtil.java.

Vector DecompilerUtil::flattenStmts Stmt   stmts[] [inline, static]
 

This method is basically flatten out all the related statements by replacing all occurence of Jimple's temporary variable with the real ones. This method also detects whether we find parameter bindings and field default values.

Definition at line 270 of file DecompilerUtil.java.

boolean DecompilerUtil::isAbstracted Abstraction   lt [inline, static]
 

Returns:
boolean

Definition at line 479 of file DecompilerUtil.java.

boolean DecompilerUtil::isAllowField   [inline, static]
 

Returns:
boolean

Definition at line 498 of file DecompilerUtil.java.

Referenced by flattenStmts().

boolean DecompilerUtil::isDebugInfo   [inline, static]
 

Returns:
boolean

Definition at line 509 of file DecompilerUtil.java.

void DecompilerUtil::setAllowField boolean   newAllowField [inline, static]
 

Parameters:
newAllowField   boolean

Definition at line 574 of file DecompilerUtil.java.

void DecompilerUtil::setDebugInfo boolean   newDebugInfo [inline, static]
 

Parameters:
newDebugInfo   boolean

Definition at line 581 of file DecompilerUtil.java.


The documentation for this class was generated from the following file:
Generated at Thu Feb 7 07:08:51 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001