public static PsiMethod getFunctionalInterfaceMethod(@Nullable PsiElement element) {
    return element instanceof PsiFunctionalExpression ? getFunctionalInterfaceMethod(((PsiFunctionalExpression)element).getFunctionalInterfaceType()) : null;
  }
public static PsiMethod getFunctionalInterfaceMethod(@Nullable PsiElement element)