soot.javaToJimple
Class JimpleBodyBuilder

java.lang.Object
  extended bysoot.javaToJimple.AbstractJimpleBodyBuilder
      extended bysoot.javaToJimple.JimpleBodyBuilder
Direct Known Subclasses:
AnonInitBodyBuilder

public class JimpleBodyBuilder
extends AbstractJimpleBodyBuilder


Field Summary
 
Fields inherited from class soot.javaToJimple.AbstractJimpleBodyBuilder
body
 
Constructor Summary
JimpleBodyBuilder()
           
 
Method Summary
 Constant createConstant(polyglot.ast.Expr expr)
           
protected  Value createExpr(polyglot.ast.Expr expr)
          Expression Creation
 JimpleBody createJimpleBody(polyglot.ast.Block block, List formals, SootMethod sootMethod)
          Jimple Body Creation
protected  Value createLHS(polyglot.ast.Expr expr)
          create LHS expressions
protected  void createStmt(polyglot.ast.Stmt stmt)
          Stmt creation
protected  Local generateLocal(polyglot.types.Type polyglotType)
          Extra Local Variables Generation
protected  Local generateLocal(Type sootType)
           
protected  Value getAssignLocal(polyglot.ast.Assign assign)
          Assign Expression Creation
protected  Value getAssignRightLocal(polyglot.ast.Assign assign, Local leftLocal)
           
protected  Value getBaseLocal(polyglot.ast.Receiver receiver)
           
protected  Constant getConstant(Type type, int val)
          Returns a needed constant given a type and val
protected  FieldRef getFieldRef(polyglot.ast.Field field)
          creates a field ref
protected  Value getSimpleAssignRightLocal(polyglot.ast.Assign assign)
           
protected  SootMethodRef getSootMethodRef(polyglot.ast.Call call)
           
protected  Local getThis(Type sootType)
           
protected  void handleFieldInits(ArrayList fieldInits)
           
protected  Local handlePrivateFieldAssignSet(polyglot.ast.Assign assign)
           
protected  Local handlePrivateFieldSet(polyglot.ast.Expr expr, Value right, Value base)
           
protected  Local handlePrivateFieldUnarySet(polyglot.ast.Unary unary)
           
protected  void handleStaticBlocks(ArrayList initializerBlocks)
           
protected  boolean needsAccessor(polyglot.ast.Expr expr)
           
protected  boolean needsAccessor(polyglot.types.MemberInstance inst)
          needs accessors: when field or meth is private and in some other class when field or meth is protected and in
protected  boolean needsOuterClassRef(polyglot.types.ClassType typeToInvoke)
           
 
Methods inherited from class soot.javaToJimple.AbstractJimpleBodyBuilder
base, base, ext, ext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JimpleBodyBuilder

public JimpleBodyBuilder()
Method Detail

createJimpleBody

public JimpleBody createJimpleBody(polyglot.ast.Block block,
                                   List formals,
                                   SootMethod sootMethod)
Jimple Body Creation

Overrides:
createJimpleBody in class AbstractJimpleBodyBuilder

handleFieldInits

protected void handleFieldInits(ArrayList fieldInits)

handleStaticBlocks

protected void handleStaticBlocks(ArrayList initializerBlocks)

createStmt

protected void createStmt(polyglot.ast.Stmt stmt)
Stmt creation

Overrides:
createStmt in class AbstractJimpleBodyBuilder

createConstant

public Constant createConstant(polyglot.ast.Expr expr)

createExpr

protected Value createExpr(polyglot.ast.Expr expr)
Expression Creation

Overrides:
createExpr in class AbstractJimpleBodyBuilder

handlePrivateFieldUnarySet

protected Local handlePrivateFieldUnarySet(polyglot.ast.Unary unary)
Overrides:
handlePrivateFieldUnarySet in class AbstractJimpleBodyBuilder

handlePrivateFieldAssignSet

protected Local handlePrivateFieldAssignSet(polyglot.ast.Assign assign)
Overrides:
handlePrivateFieldAssignSet in class AbstractJimpleBodyBuilder

handlePrivateFieldSet

protected Local handlePrivateFieldSet(polyglot.ast.Expr expr,
                                      Value right,
                                      Value base)
Overrides:
handlePrivateFieldSet in class AbstractJimpleBodyBuilder

getAssignRightLocal

protected Value getAssignRightLocal(polyglot.ast.Assign assign,
                                    Local leftLocal)
Overrides:
getAssignRightLocal in class AbstractJimpleBodyBuilder

getSimpleAssignRightLocal

protected Value getSimpleAssignRightLocal(polyglot.ast.Assign assign)
Overrides:
getSimpleAssignRightLocal in class AbstractJimpleBodyBuilder

getAssignLocal

protected Value getAssignLocal(polyglot.ast.Assign assign)
Assign Expression Creation


needsAccessor

protected boolean needsAccessor(polyglot.ast.Expr expr)
Overrides:
needsAccessor in class AbstractJimpleBodyBuilder

needsAccessor

protected boolean needsAccessor(polyglot.types.MemberInstance inst)
needs accessors: when field or meth is private and in some other class when field or meth is protected and in


getFieldRef

protected FieldRef getFieldRef(polyglot.ast.Field field)
creates a field ref

Overrides:
getFieldRef in class AbstractJimpleBodyBuilder

getConstant

protected Constant getConstant(Type type,
                               int val)
Returns a needed constant given a type and val

Overrides:
getConstant in class AbstractJimpleBodyBuilder

getThis

protected Local getThis(Type sootType)
Overrides:
getThis in class AbstractJimpleBodyBuilder

needsOuterClassRef

protected boolean needsOuterClassRef(polyglot.types.ClassType typeToInvoke)

getSootMethodRef

protected SootMethodRef getSootMethodRef(polyglot.ast.Call call)
Overrides:
getSootMethodRef in class AbstractJimpleBodyBuilder

getBaseLocal

protected Value getBaseLocal(polyglot.ast.Receiver receiver)
Overrides:
getBaseLocal in class AbstractJimpleBodyBuilder

createLHS

protected Value createLHS(polyglot.ast.Expr expr)
create LHS expressions

Overrides:
createLHS in class AbstractJimpleBodyBuilder

generateLocal

protected Local generateLocal(polyglot.types.Type polyglotType)
Extra Local Variables Generation

Overrides:
generateLocal in class AbstractJimpleBodyBuilder

generateLocal

protected Local generateLocal(Type sootType)
Overrides:
generateLocal in class AbstractJimpleBodyBuilder