コード例 #1
0
ファイル: PegGraph.java プロジェクト: Hounge/apkinspector
  public void computeMonitorObjs() {
    Set maps = monitor.entrySet();
    for (Iterator iter = maps.iterator(); iter.hasNext(); ) {
      Map.Entry entry = (Map.Entry) iter.next();

      FlowSet fs = (FlowSet) entry.getValue();
      Iterator it = fs.iterator();
      while (it.hasNext()) {
        Object obj = it.next();
        if (!monitorObjs.contains(obj)) monitorObjs.add(obj);
      }
    }
  }
コード例 #2
0
  private void visitNode(
      Set<Object> gray,
      Object obj,
      LinkedList<Object> changedUnits,
      HashSet<Object> changedUnitsSet) {

    gray.add(obj);
    changedUnits.addLast(obj);
    changedUnitsSet.add(obj);
    nodes.add(obj);
    valueBefore.add(newInitialFlow());
    valueAfter.add(newInitialFlow());
    Iterator succsIt = graph.getSuccsOf(obj).iterator();
    if (g.getSuccsOf(obj).size() > 0) {
      while (succsIt.hasNext()) {
        Object succ = succsIt.next();
        if (!gray.contains(succ)) {

          visitNode(gray, succ, changedUnits, changedUnitsSet);
        }
      }
    }
  }