|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectabc.soot.util.Restructure
public class Restructure
This class contains a variety of helper methods to restructure Soot method Bodies.
Nested Class Summary | |
---|---|
static class |
Restructure.JavaTypeInfo
This class helps implement boxing. |
Constructor Summary | |
---|---|
Restructure()
|
Method Summary | |
---|---|
static Local |
addParameterToMethod(SootMethod method,
Type type,
java.lang.String suggestedName)
Adds a new parameter to a method and creates the matching identity statement. |
static Stmt |
findFirstRealStmt(SootMethod m,
Chain units)
Given a Chain for the body of a method, find the first "real" stmt (i.e. not an identity stmt or the copy of "this" we often make) and return a reference to it. |
static Stmt |
findFirstRealStmtOrNop(SootMethod m,
Chain units)
|
static InvokeStmt |
findInitStmt(Chain units)
Given a Chain for a body of an |
static AssignStmt |
getEquivAssignStmt(SootMethod m,
InvokeStmt stmt)
|
static IdentityStmt |
getParameterIdentityStatement(SootMethod method,
int arg)
Retrieves the identity statement of the argument at position arg |
static Local |
getThisLocal(SootMethod m)
Restructure the method to place a copy of 'this' in a new local variable. |
static ConstructorInliningMap |
inlineThisCall(SootMethod method)
inline a call to this() if one exists, return a ConstructorInliningMap if an inlining was done, null otherwise (no this() to inline). |
static void |
insertBoxingCast(Body body,
AssignStmt stmt,
boolean allowBoxing)
Converts the assignment statement into a sequence of statements performing a typecast. |
static boolean |
isBaseClass(SootClass baseClass,
SootClass subClass)
|
static void |
reset()
|
static void |
resetTrapsEnd(Body b,
Stmt oldend,
Stmt newend)
update all traps that used to end at oldend to now end at newend |
static void |
resetTrapsStart(Body b,
Stmt oldstart,
Stmt newstart)
update all traps that used to start at oldstart to now start at newstart |
static Stmt |
restructureReturn(SootMethod method)
Given a SootMethod, restructure its body so that the body ends with L1:nop; return; or L1:nop; return( |
static void |
validateMethod(SootMethod method)
Sanity check for methods. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Restructure()
Method Detail |
---|
public static void reset()
public static InvokeStmt findInitStmt(Chain units)
public static Stmt findFirstRealStmt(SootMethod m, Chain units)
public static Stmt findFirstRealStmtOrNop(SootMethod m, Chain units)
public static void resetTrapsEnd(Body b, Stmt oldend, Stmt newend)
public static void resetTrapsStart(Body b, Stmt oldstart, Stmt newstart)
public static Stmt restructureReturn(SootMethod method)
public static ConstructorInliningMap inlineThisCall(SootMethod method)
public static Local getThisLocal(SootMethod m)
public static AssignStmt getEquivAssignStmt(SootMethod m, InvokeStmt stmt)
public static void validateMethod(SootMethod method)
method
- public static void insertBoxingCast(Body body, AssignStmt stmt, boolean allowBoxing)
body
- stmt
- public static IdentityStmt getParameterIdentityStatement(SootMethod method, int arg)
method
- arg
-
public static Local addParameterToMethod(SootMethod method, Type type, java.lang.String suggestedName)
method
- type
- suggestedName
-
public static boolean isBaseClass(SootClass baseClass, SootClass subClass)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |