+ public static InstanceFieldRef newIFR(Body body, SootFieldRef fr) {
+ return Jimple.v().newInstanceFieldRef(body.getThisLocal(), fr);
+ }
+
+ public Type objectType;
+ public List arrayCopyTypes = new LinkedList();
+ public SootMethodRef arrayCopy;
+ public void init() {
+ objectType = Scene.v().getSootClass("java.lang.Object").getType();
+ arrayCopyTypes.add(objectType);
+ arrayCopyTypes.add(IntType.v());
+ arrayCopyTypes.add(objectType);
+ arrayCopyTypes.add(IntType.v());
+ arrayCopyTypes.add(IntType.v());
+ arrayCopy =
+ Scene.v().makeMethodRef(Scene.v().getSootClass("java.lang.System"),
+ "arraycopy",
+ arrayCopyTypes,
+ VoidType.v(),
+ true);
+ }
+
+ public static void assign(Body b, Value left, Value right) { b.getUnits().add(Jimple.v().newAssignStmt(left, right)); }
+ public static void assign(Body b, Value left, Value right, Stmt where) {
+ b.getUnits().insertBefore(Jimple.v().newAssignStmt(left, right), where);
+ }
+