当前位置: 首页>>代码示例>>Java>>正文


Java Edge.tgt方法代码示例

本文整理汇总了Java中soot.jimple.toolkits.callgraph.Edge.tgt方法的典型用法代码示例。如果您正苦于以下问题:Java Edge.tgt方法的具体用法?Java Edge.tgt怎么用?Java Edge.tgt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在soot.jimple.toolkits.callgraph.Edge的用法示例。


在下文中一共展示了Edge.tgt方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

import soot.jimple.toolkits.callgraph.Edge; //导入方法依赖的package包/类
private void visit(Set<SootMethod> alreadyVisited, SootMethod current, int depth) {
  if (depth >= ConfigCHA.v().getGraphOutMaxDepth())
    return;
  Iterator<Edge> it = cg.edgesOutOf(current);
  while (it.hasNext()) {
    Edge e = it.next();
    SootMethod tgt = e.tgt();
    for (int i=0; i < ConfigCHA.v().getGraphOutMaxDepth(); i++) {
      if (depth <= i)
        out.get(i).println(current+";"+tgt);
    }
    if (alreadyVisited.contains(tgt))
      continue;
    alreadyVisited.add(tgt);
    visit(alreadyVisited, tgt, depth+1);
  }
}
 
开发者ID:Alexandre-Bartel,项目名称:permission-map,代码行数:18,代码来源:OutputGraph.java

示例2: findTargetMethods

import soot.jimple.toolkits.callgraph.Edge; //导入方法依赖的package包/类
private List<SootMethod> findTargetMethods(Unit unit, CallGraph cg, boolean canBeNullList, boolean canBeNative){
	List<SootMethod> target = new ArrayList<SootMethod>(); 
	Iterator<Edge> it = cg.edgesOutOf(unit);
	while (it.hasNext()){
		Edge edge = it.next();
		SootMethod targetMethod = edge.tgt();
		if (targetMethod.isNative() && !canBeNative )
			continue;
		if (edge.kind() == Kind.CLINIT )
			continue;
		target.add(targetMethod);
	}
	if (target.size() < 1 && !canBeNullList){
		throw new RuntimeException("No target method for: "+unit);
	}
	return target;
}
 
开发者ID:parasol-aser,项目名称:tsa,代码行数:18,代码来源:MultiRunStatementsFinderX.java

示例3: analyzeEdge

import soot.jimple.toolkits.callgraph.Edge; //导入方法依赖的package包/类
private void analyzeEdge(Edge edge)
{
    SootMethod m=edge.tgt();

    if (edge.isThreadRunCall())
    {
        threadsEntryMethod.add(m);
        dprintln("Found thread entry method: "+m.getSignature());
    }
}
 
开发者ID:trxsys,项目名称:gluon,代码行数:11,代码来源:ThreadAnalysis.java

示例4: countCallChains

import soot.jimple.toolkits.callgraph.Edge; //导入方法依赖的package包/类
private static long countCallChains(SootMethod method, int k) {
	if (k == 0)
		return 1;
	
	long count = 1;
	Iterator<Edge> edges = Scene.v().getCallGraph().edgesOutOf(method);
	while(edges.hasNext()) {
		Edge edge = edges.next();
		if (edge.isExplicit()) {
			SootMethod target = edge.tgt();
			count = count + countCallChains(target, k-1);
		}
	}
	return count;
}
 
开发者ID:rohanpadhye,项目名称:vasco,代码行数:16,代码来源:CallGraphTest.java

示例5: search

import soot.jimple.toolkits.callgraph.Edge; //导入方法依赖的package包/类
private static void search(CallGraph cg, SootMethod l, Stack<SootMethod> stack, int depth) {
  logger.debug(" <"+ depth +"> propagate from "+ l);
  
  if (depth == 1)
    currentWrapper = l;
  
  if (depth == 2) {
    currentEntryPoint = l;
    if (currentEntryPoint.toString().contains("GenerationGG") ||
        //currentEntryPoint.toString().contains("init>") ||
        currentEntryPoint.toString().contains("ServicesInit:")) {
          
        } else {
          if (!currentEntryPoint.toString().contains("DumbClass:")) {    
    EntryPointKey epk = new EntryPointKey(currentWrapper, currentEntryPoint);
    entryPointsToPermissionSet.put(epk, null);
          }
        }
  }
  
  if (alreadyComputed.contains(l)) {
    addPermissionsToStack(stack, l);
    return;
  }
  
  
  Iterator<Edge> it = cg.edgesOutOf(l);
  while (it.hasNext()) {
    Edge e = it.next();
    SootMethod outMethod = e.tgt();
    
    if (outMethod.toString().equals(l.toString())){
      logger.warn("outMethod same as l: "+ l);
      continue;
    }
    if (stack.contains(outMethod))
      throw new RuntimeException("cycle in stack!\n" + outMethod +"\n"+ Util.printStack(stack));
    
    addPermissionsToStack(stack, outMethod);
    
    stack.push(outMethod);
    search(cg, outMethod, stack, depth+1);
    stack.pop();
  }
  
  alreadyComputed.add(l);
  if (!methodToPermissionSet.containsKey(l))
    methodToPermissionSet.put(l, new HashSet<String>());

}
 
开发者ID:Alexandre-Bartel,项目名称:permission-map,代码行数:51,代码来源:ForwardSearch.java


注:本文中的soot.jimple.toolkits.callgraph.Edge.tgt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。