private void processReachables() { reachableMethods.update(); while (reachablesReader.hasNext()) { MethodOrMethodContext m = (MethodOrMethodContext) reachablesReader.next(); MethodPAG mpag = MethodPAG.v(pag, m.method()); mpag.build(); mpag.addToPAG(m.context()); } }
public OnFlyCallGraph(PAG pag) { this.pag = pag; CGOptions options = new CGOptions(PhaseOptions.v().getPhaseOptions("cg")); if (options.all_reachable()) { List entryPoints = new ArrayList(); entryPoints.addAll(EntryPoints.v().all()); entryPoints.addAll(EntryPoints.v().methodsOfApplicationClasses()); Scene.v().setEntryPoints(entryPoints); } callGraph = new CallGraph(); Scene.v().setCallGraph(callGraph); ContextManager cm = CallGraphBuilder.makeContextManager(callGraph); reachableMethods = Scene.v().getReachableMethods(); ofcgb = new OnFlyCallGraphBuilder(cm, reachableMethods); reachablesReader = reachableMethods.listener(); callEdges = cm.callGraph().listener(); }