/** * Set up an AnalysisOptions object with default selectors, corresponding to class hierarchy lookup * * @throws IllegalArgumentException if options is null */ public static void addDefaultSelectors(AnalysisOptions options, IClassHierarchy cha) { if (options == null) { throw new IllegalArgumentException("options is null"); } options.setSelector(new LambdaMethodTargetSelector(new ClassHierarchyMethodTargetSelector(cha))); options.setSelector(new ClassHierarchyClassTargetSelector(cha)); }
/** * Set up an AnalysisOptions object with default selectors, corresponding to class hierarchy lookup * * @throws IllegalArgumentException if options is null */ public static void addDefaultSelectors(AnalysisOptions options, IClassHierarchy cha) { if (options == null) { throw new IllegalArgumentException("options is null"); } options.setSelector(new LambdaMethodTargetSelector(new ClassHierarchyMethodTargetSelector(cha))); options.setSelector(new ClassHierarchyClassTargetSelector(cha)); }
public static void addBypassLogic(AnalysisOptions options, AnalysisScope scope, ClassLoader cl, XMLMethodSummaryReader summary, IClassHierarchy cha) throws IllegalArgumentException { if (scope == null) { throw new IllegalArgumentException("scope is null"); } if (options == null) { throw new IllegalArgumentException("options is null"); } if (cl == null) { throw new IllegalArgumentException("cl is null"); } if (cha == null) { throw new IllegalArgumentException("cha cannot be null"); } MethodTargetSelector ms = new BypassMethodTargetSelector(options.getMethodTargetSelector(), summary.getSummaries(), summary.getIgnoredPackages(), cha); options.setSelector(ms); ClassTargetSelector cs = new BypassClassTargetSelector(options.getClassTargetSelector(), summary.getAllocatableClasses(), cha, cha.getLoader(scope.getLoader(Atom.findOrCreateUnicodeAtom("Synthetic")))); options.setSelector(cs); }
public static void addBypassLogic(AnalysisOptions options, AnalysisScope scope, ClassLoader cl, XMLMethodSummaryReader summary, IClassHierarchy cha) throws IllegalArgumentException { if (scope == null) { throw new IllegalArgumentException("scope is null"); } if (options == null) { throw new IllegalArgumentException("options is null"); } if (cl == null) { throw new IllegalArgumentException("cl is null"); } if (cha == null) { throw new IllegalArgumentException("cha cannot be null"); } MethodTargetSelector ms = new BypassMethodTargetSelector(options.getMethodTargetSelector(), summary.getSummaries(), summary.getIgnoredPackages(), cha); options.setSelector(ms); ClassTargetSelector cs = new BypassClassTargetSelector(options.getClassTargetSelector(), summary.getAllocatableClasses(), cha, cha.getLoader(scope.getLoader(Atom.findOrCreateUnicodeAtom("Synthetic")))); options.setSelector(cs); }
options.getMethodTargetSelector(), summaries, nativeSummaries.getIgnoredPackages(), cha); options.setSelector(ms); cha.getLoader(scope.getLoader(Atom .findOrCreateUnicodeAtom("Synthetic")))); options.setSelector(cs);
public static void addDefaultDispatchLogic(AnalysisOptions options, IClassHierarchy cha) { com.ibm.wala.ipa.callgraph.impl.Util.addDefaultSelectors(options, cha); Map<Atom,MethodTargetSelector> methodTargetSelectors = HashMapFactory.make(); methodTargetSelectors.put(JavaScriptLoader.JS.getName(), new JavaScriptConstructTargetSelector(cha, new StandardFunctionTargetSelector(cha, options.getMethodTargetSelector()))); methodTargetSelectors.put(Language.JAVA.getName(), options.getMethodTargetSelector()); options.setSelector(new CrossLanguageMethodTargetSelector(methodTargetSelectors)); }
public static void analyzeMethodHandles(AnalysisOptions options, SSAPropagationCallGraphBuilder builder) { options.setSelector(new InvokeExactTargetSelector(options.getMethodTargetSelector())); builder.setContextSelector(new ContextSelectorImpl(builder.getContextSelector())); builder.setContextInterpreter(new DelegatingSSAContextInterpreter(new InvokeContextInterpreterImpl(), builder.getCFAContextInterpreter())); builder.setContextInterpreter(new DelegatingSSAContextInterpreter(new FindContextInterpreterImpl(), builder.getCFAContextInterpreter())); } }
public static void analyzeMethodHandles(AnalysisOptions options, SSAPropagationCallGraphBuilder builder) { options.setSelector(new InvokeExactTargetSelector(options.getMethodTargetSelector())); builder.setContextSelector(new ContextSelectorImpl(builder.getContextSelector())); builder.setContextInterpreter(new DelegatingSSAContextInterpreter(new InvokeContextInterpreterImpl(), builder.getCFAContextInterpreter())); builder.setContextInterpreter(new DelegatingSSAContextInterpreter(new FindContextInterpreterImpl(), builder.getCFAContextInterpreter())); } }