@SuppressWarnings({"unchecked", "PMD.PreserveStackTrace"})
    public static <T> T checkedCreateInstance(Class<T> type,
            Class<?>[] parameters,
            Object... values) {

        try {
            var methodHandle = MethodHandles.lookup().findConstructor(type, MethodType.methodType(void.class, parameters));
            methodHandle = methodHandle.asType(MethodType.methodType(type, parameters));
            return (T) methodHandle.invokeWithArguments(values);
        } catch (Throwable t) {
            throw throwAnyway(t);
        }
    }
Create a new instance for a type.

@param type       The type to create.
@param parameters The type parameters for the constructor.
@param values     Type values for the constructor. The number of values must match the number of type parameters.
@return An instance of the type.
core/src/main/java/org/jdbi/v3/core/internal/JdbiClassUtils.java