static QualifiedArgumentFactory adapt(ConfigRegistry config, ArgumentFactory factory) {
        if (factory instanceof ArgumentFactory.Preparable) {
            return adapt(config, (ArgumentFactory.Preparable) factory);
        }
        Set<Annotation> qualifiers = config.get(Qualifiers.class).findFor(factory.getClass());
        return (type, value, cfg) ->
            type.getQualifiers().equals(qualifiers)
                ? factory.build(type.getType(), value, cfg)
                : Optional.empty();
    }
Adapts an {@link ArgumentFactory} into a QualifiedArgumentFactory. The returned factory only
matches qualified types with zero qualifiers.

@param config the ConfigRegistry
@param factory the factory to adapt
core/src/main/java/org/jdbi/v3/core/argument/QualifiedArgumentFactory.java