Factory<UsageSearcher> (@NotNull final Project project, @NotNull final AnalysisScope scope) { return () -> new UsageInfoSearcherAdapter() { @Override protected UsageInfo @NotNull [] findUsages() { return ObjectUtils.notNull(InferNullityAnnotationsAction.this.findUsages(project, scope, scope.getFileCount()), UsageInfo.EMPTY_ARRAY); } @Override public void generate(@NotNull Processor<? super Usage> processor) { processUsages(processor, project); } }; }