private static boolean process18MethodPointers(@NotNull final Processor<? super PsiReference> processor,
                                                 @NotNull final PsiMethod constructor,
                                                 @NotNull final Project project,
                                                 @NotNull PsiClass aClass, SearchScope searchScope) {
    return ReferencesSearch.search(aClass, searchScope).forEach(reference -> {
      final PsiElement element = reference.getElement();
      return DumbService.getInstance(project).runReadActionInSmartMode(() -> {
        final PsiElement parent = element.getParent();
        if (parent instanceof PsiMethodReferenceExpression &&
            ((PsiMethodReferenceExpression)parent).getReferenceNameElement() instanceof PsiKeyword) {
          if (((PsiMethodReferenceExpression)parent).isReferenceTo(constructor)) {
            if (!processor.process((PsiReference)parent)) return false;
          }
        }
        return true;
      });
    });
  }
private static boolean process18MethodPointers(@NotNull final Processor<? super PsiReference> processor,
                                                 @NotNull final PsiMethod constructor,
                                                 @NotNull final Project project,
                                                 @NotNull PsiClass aClass, SearchScope searchScope)