private static PsiType getFunctionalInterfaceTypeByContainingLambda( @NotNull PsiLambdaExpression parentLambda) { final PsiType parentInterfaceType = parentLambda.getFunctionalInterfaceType(); return parentInterfaceType != null ? getFunctionalInterfaceReturnType(parentInterfaceType) : null; }
@Nullable public static PsiType getFunctionalInterfaceReturnType(PsiLambdaExpression expr) { return getFunctionalInterfaceReturnType(expr.getFunctionalInterfaceType()); }