use of soot.jimple.toolkits.thread.mhp.TargetMethodsFinder in project soot by Sable.
the class MultiRunStatementsFinder method findMultiCalledMethodsIntra.
private void findMultiCalledMethodsIntra(Set<SootMethod> multiCalledMethods, CallGraph callGraph) {
Iterator<Unit> it = multiRunStatements.iterator();
while (it.hasNext()) {
Stmt stmt = (Stmt) it.next();
if (stmt.containsInvokeExpr()) {
InvokeExpr invokeExpr = stmt.getInvokeExpr();
List<SootMethod> targetList = new ArrayList<SootMethod>();
SootMethod method = invokeExpr.getMethod();
if (invokeExpr instanceof StaticInvokeExpr) {
targetList.add(method);
} else if (invokeExpr instanceof InstanceInvokeExpr) {
if (method.isConcrete() && !method.getDeclaringClass().isLibraryClass()) {
TargetMethodsFinder tmd = new TargetMethodsFinder();
targetList = tmd.find(stmt, callGraph, true, true);
}
}
if (targetList != null) {
Iterator<SootMethod> iterator = targetList.iterator();
while (iterator.hasNext()) {
SootMethod obj = iterator.next();
if (!obj.isNative()) {
multiCalledMethods.add(obj);
}
}
}
}
}
}
Aggregations