public static boolean isLambdaForm(PsiAnonymousClass aClass,
                                     boolean acceptParameterizedFunctionTypes,
                                     boolean reportNotAnnotatedInterfaces,
                                     @NotNull Set<String> ignoredRuntimeAnnotations) {
    if (PsiUtil.isAvailable(JavaFeature.LAMBDA_EXPRESSIONS, aClass)) {
      final PsiClassType baseClassType = aClass.getBaseClassType();
      final PsiClassType.ClassResolveResult resolveResult = baseClassType.resolveGenerics();
      final PsiClass baseClass = resolveResult.getElement();
      if (baseClass == null ||
          !reportNotAnnotatedInterfaces && !AnnotationUtil.isAnnotated(baseClass, CommonClassNames.JAVA_LANG_FUNCTIONAL_INTERFACE, CHECK_EXTERNAL)) {
        return false;
      }
      final PsiMethod interfaceMethod = LambdaUtil.getFunctionalInterfaceMethod(resolveResult);
      if (interfaceMethod != null && (acceptParameterizedFunctionTypes || !interfaceMethod.hasTypeParameters())) {
        if (isLambdaForm(aClass, ignoredRuntimeAnnotations)) {
          final PsiMethod method = aClass.getMethods()[0];
          return getInferredType(aClass, method) != null;
        }
      }
    }
    return false;
  }
public static boolean isLambdaForm(PsiAnonymousClass aClass,
                                     boolean acceptParameterizedFunctionTypes,
                                     boolean reportNotAnnotatedInterfaces,
                                     @NotNull Set<String> ignoredRuntimeAnnotations)