Java 烟尘中的调用图

Java 烟尘中的调用图,java,eclipse,call-graph,soot,Java,Eclipse,Call Graph,Soot,如何使用烟尘构建at调用图?还是有更好的计划?我被派到同样的五页去寻找答案,但我找不到我要找的。Eclipse的插件版本也有问题。它安装正确,但当我想运行代码时,我无法选择它 以下是一些示例,包括Java调用图 和apk的调用图。 如果你想得到这个点文件,你可以在调用图上迭代,然后像这样用点格式写出内容 私有静态无效访问(调用图cg,SootMethod方法){ 字符串标识符=方法.getSignature(); visitored.put(method.getSignature(),true

如何使用烟尘构建at调用图?还是有更好的计划?我被派到同样的五页去寻找答案,但我找不到我要找的。Eclipse的插件版本也有问题。它安装正确,但当我想运行代码时,我无法选择它

以下是一些示例,包括Java调用图

和apk的调用图。

如果你想得到这个点文件,你可以在调用图上迭代,然后像这样用点格式写出内容

私有静态无效访问(调用图cg,SootMethod方法){
字符串标识符=方法.getSignature();
visitored.put(method.getSignature(),true);
dot.drawNode(标识符);
//迭代未访问的父母
迭代器ptargets=新目标(cg.edgesInto(方法));
if(ptargets!=null){
while(ptargets.hasNext()){
SootMethod parent=(SootMethod)ptargets.next();
如果(!visted.containsKey(parent.getSignature()))访问(cg,parent);
}
}
//迭代未访问的儿童
迭代器ctargets=新目标(cg.edgesutof(方法));
如果(ctargets!=null){
while(ctargets.hasNext()){
SootMethod子对象=(SootMethod)ctargets.next();
dot.draudge(标识符,child.getSignature());
System.out.println(方法+“可以调用”+子对象);
如果(!visted.containsKey(child.getSignature()))访问(cg,child);
}
}
}

对先前答案的小修改

私有静态无效访问(调用图cg,SootMethod方法){
字符串标识符=方法.getSignature();
visitored.put(method.getSignature(),true);
dot.drawNode(标识符);
//迭代未访问的父母
迭代器ptargets=新源(cg.edgesInto(方法));
if(ptargets!=null){
while(ptargets.hasNext()){
SootMethod parent=(SootMethod)ptargets.next();
如果(!visted.containsKey(parent.getSignature()))访问(cg,parent);
}
}