presto-main/src/main/java/io/prestosql/sql/gen/LambdaCapture.java/LambdaCapture/lambdaCapture
class LambdaCapture:    public static CallSite lambdaCapture(
            MethodHandles.Lookup callerLookup,
            String name,
            MethodType type,
            MethodType samMethodType,
            MethodHandle implMethod,
            MethodType instantiatedMethodType)
    {
        try {
            // delegate to metafactory, we may choose to generate code ourselves in the future.
            return LambdaMetafactory.metafactory(
                    callerLookup,
                    name,
                    type,
                    samMethodType,
                    implMethod,
                    instantiatedMethodType);
        }
        catch (LambdaConversionException e) {
            throwIfUnchecked(e);
            throw new RuntimeException(e);
        }
    }