public static PsiExpression convertAnonymousClass(@NotNull PsiNewExpression expression,
                                                    @NotNull PsiAnonymousClass anonymousClass,
                                                    @NotNull TypeEvaluator typeEvaluator) {
    final GuavaConversionSettings settings = typeEvaluator.getSettings(GuavaConversionSettings.class);
    final Set<String> ignoredAnnotations = settings != null ? settings.getIgnoredAnnotations() : Collections.emptySet();
    if (AnonymousCanBeLambdaInspection.canBeConvertedToLambda(anonymousClass, true, ignoredAnnotations)) {
      return AnonymousCanBeLambdaInspection.replacePsiElementWithLambda(expression, true, true);
    } else {
      return tryConvertClassAndSamNameToJava(expression);
    }
  }
public static PsiExpression convertAnonymousClass(@NotNull PsiNewExpression expression,
                                                    @NotNull PsiAnonymousClass anonymousClass,
                                                    @NotNull TypeEvaluator typeEvaluator)