Search in sources :

Example 1 with FooInit

use of dk.brics.soot.intermediate.representation.FooInit in project soot by Sable.

the class ExprTranslator method caseSpecialInvokeExpr.

public void caseSpecialInvokeExpr(SpecialInvokeExpr expr) {
    // Constructor calls, maybe
    Variable bvar = st.getLocalVariable((Local) expr.getBase());
    SootMethod m = expr.getMethod();
    if (m.getName().equals("<init>")) {
        SootClass dc = m.getDeclaringClass();
        if (isFoo(dc)) {
            FooInit fi = new FooInit();
            fi.setAssignmentTarget(bvar);
            st.addStatement(fi);
            return;
        }
    }
    handleCall(expr, expr.getMethod());
}
Also used : Variable(dk.brics.soot.intermediate.representation.Variable) SootMethod(soot.SootMethod) FooInit(dk.brics.soot.intermediate.representation.FooInit) SootClass(soot.SootClass)

Aggregations

FooInit (dk.brics.soot.intermediate.representation.FooInit)1 Variable (dk.brics.soot.intermediate.representation.Variable)1 SootClass (soot.SootClass)1 SootMethod (soot.SootMethod)1