Java 类soot.jimple.internal.JNewExpr 实例源码

项目:petablox    文件:DomH.java   
public static Type getType(Unit u) {                                 
    Type t=null;
    if(u instanceof JAssignStmt){
        JAssignStmt as = (JAssignStmt) u;
        Value right=as.rightBox.getValue();
        if (SootUtilities.isNewStmt(as)) 
            t = ((JNewExpr)right).getType();
        else if (SootUtilities.isNewArrayStmt(as)) 
            t = ((JNewArrayExpr)right).getType();
        else if (SootUtilities.isNewMultiArrayStmt(as))
            t = ((JNewMultiArrayExpr)right).getType();
    }
    else {
        assert (SootUtilities.isInvoke(u));
        t = null;
    }
    return t;
}
项目:petablox    文件:SootUtilities.java   
public static boolean isNewStmt(JAssignStmt a){
    Value right=a.rightBox.getValue();
    if(right instanceof JNewExpr)
        return true;
    return false;
}