@SuppressWarnings("unchecked")
    public static <T> T findConstructorAndCreateInstance(Class<T> type,
            Class<?>[] types,
            MethodHandleInvoker invoker) {
        try {
            var ctorHandle = METHOD_HANDLE_CACHE.computeIfAbsent(type, t -> findCtorMethodHandleForParameters(t, types));
            return (T) invoker.createInstance(ctorHandle);
        } catch (Throwable t) {
            throw throwAnyway(t);
        }
    }
Inspect a type, find a matching constructor and return an instance. The method tries to match as many parameters as possible
to the available constructors, cutting off parameters from the end one-by-one until a matching constructor is found.

@param type    The type that should be instantiated
@param types   Array of parameter types
@param invoker An implementation of a method invoker to create an instance of the type
@return An instance of the type created by the first constructor found when looking up
core/src/main/java/org/jdbi/v3/core/internal/JdbiClassUtils.java