/** * @param options governing call graph construction options * @param pointerKeyFactory factory which embodies pointer abstraction policy */ protected PropagationCallGraphBuilder(IMethod abstractRootMethod, AnalysisOptions options, IAnalysisCacheView cache, PointerKeyFactory pointerKeyFactory) { if (abstractRootMethod == null) { throw new IllegalArgumentException("cha is null"); } if (options == null) { throw new IllegalArgumentException("options is null"); } assert cache != null; this.cha = abstractRootMethod.getClassHierarchy(); this.options = options; this.analysisCache = cache; // we need pointer keys to handle reflection assert pointerKeyFactory != null; this.pointerKeyFactory = pointerKeyFactory; callGraph = createEmptyCallGraph(abstractRootMethod, options); try { callGraph.init(); } catch (CancelException e) { if (DEBUG_GENERAL) { System.err.println("Could not initialize the call graph due to node number constraints: " + e.getMessage()); } } callGraph.setInterpreter(contextInterpreter); JAVA_LANG_OBJECT = cha.lookupClass(TypeReference.JavaLangObject); }
/** * @param options governing call graph construction options * @param pointerKeyFactory factory which embodies pointer abstraction policy */ protected PropagationCallGraphBuilder(IMethod abstractRootMethod, AnalysisOptions options, IAnalysisCacheView cache, PointerKeyFactory pointerKeyFactory) { if (abstractRootMethod == null) { throw new IllegalArgumentException("cha is null"); } if (options == null) { throw new IllegalArgumentException("options is null"); } assert cache != null; this.cha = abstractRootMethod.getClassHierarchy(); this.options = options; this.analysisCache = cache; // we need pointer keys to handle reflection assert pointerKeyFactory != null; this.pointerKeyFactory = pointerKeyFactory; callGraph = createEmptyCallGraph(abstractRootMethod, options); try { callGraph.init(); } catch (CancelException e) { if (DEBUG_GENERAL) { System.err.println("Could not initialize the call graph due to node number constraints: " + e.getMessage()); } } callGraph.setInterpreter(contextInterpreter); JAVA_LANG_OBJECT = cha.lookupClass(TypeReference.JavaLangObject); }