Search in sources :

Example 1 with JInstanceOfExpr

use of soot.jimple.internal.JInstanceOfExpr in project soot by Sable.

the class NullnessAnalysis method handleIfStmt.

private void handleIfStmt(JIfStmt ifStmt, AnalysisInfo in, AnalysisInfo out, AnalysisInfo outBranch) {
    Value condition = ifStmt.getCondition();
    if (condition instanceof JInstanceOfExpr) {
        // a instanceof X ; if this succeeds, a is not null
        JInstanceOfExpr expr = (JInstanceOfExpr) condition;
        handleInstanceOfExpression(expr, in, out, outBranch);
    } else if (condition instanceof JEqExpr || condition instanceof JNeExpr) {
        // a==b or a!=b
        AbstractBinopExpr eqExpr = (AbstractBinopExpr) condition;
        handleEqualityOrNonEqualityCheck(eqExpr, in, out, outBranch);
    }
}
Also used : JNeExpr(soot.jimple.internal.JNeExpr) JInstanceOfExpr(soot.jimple.internal.JInstanceOfExpr) AbstractBinopExpr(soot.jimple.internal.AbstractBinopExpr) Value(soot.Value) JEqExpr(soot.jimple.internal.JEqExpr)

Aggregations

Value (soot.Value)1 AbstractBinopExpr (soot.jimple.internal.AbstractBinopExpr)1 JEqExpr (soot.jimple.internal.JEqExpr)1 JInstanceOfExpr (soot.jimple.internal.JInstanceOfExpr)1 JNeExpr (soot.jimple.internal.JNeExpr)1