@Override
  public @NotNull Function<@NotNull LookupElement, @Nullable StatisticsInfo> forLocation(@NotNull CompletionLocation location) {
    PsiElement position = location.getCompletionParameters().getPosition();
    if (SUPER_CALL.accepts(position) ||
        JavaCompletionContributor.IN_SWITCH_LABEL.accepts(position) ||
        PreferByKindWeigher.isComparisonRhs(position)) {
      return EMPTY_SERIALIZER;
    }

    ExpectedTypeInfo firstInfo = getExpectedTypeInfo(location);
    if (firstInfo != null && isInEnumAnnotationParameter(position, firstInfo)) {
      return EMPTY_SERIALIZER;
    }

    return element -> {
      Object o = element.getObject();

      if (o instanceof PsiLocalVariable || o instanceof PsiParameter ||
          o instanceof PsiThisExpression || o instanceof PsiKeyword ||
          element.getUserData(JavaCompletionUtil.SUPER_METHOD_PARAMETERS) != null ||
          FunctionalExpressionCompletionProvider.isFunExprItem(element) ||
          element.as(StreamConversion.StreamMethodInvocation.class) != null) {
        return StatisticsInfo.EMPTY;
      }

      if (o instanceof CustomStatisticsInfoProvider) {
        return ((CustomStatisticsInfoProvider)o).getStatisticsInfo();
      }

      if (o instanceof PsiClass) {
        return getClassInfo((PsiClass)o, position, firstInfo);
      }
      if (o instanceof PsiField || o instanceof PsiMethod) {
        return getFieldOrMethodInfo((PsiMember)o, element, firstInfo);
      }
      return null;
    };
  }
@Override
  public @NotNull Function<@NotNull LookupElement, @Nullable StatisticsInfo> forLocation(@NotNull CompletionLocation location)