@SuppressWarnings("unchecked")
    @Override
    public <E> E attach(Class<E> extensionType, HandleSupplier handleSupplier) {
        if (!isConcrete(extensionType)) {
            throw new IllegalStateException(format("Can not process %s, not generated SQL object", extensionType.getSimpleName()));
        }

        ConfigRegistry config = handleSupplier.getConfig();

        final ExtensionMetadata extensionMetaData = config.get(Extensions.class).findMetadata(extensionType, this);
        final ConfigRegistry instanceConfig = extensionMetaData.createInstanceConfiguration(config);

        return (E) attachedTypeCache.computeIfAbsent(extensionType, GeneratorSqlObjectFactory::getGeneratedClass)
                .invoke(handle -> handle.invokeExact(extensionMetaData, handleSupplier, instanceConfig));
    }
Attach a sql object from a jdbi generator created class.

@param extensionType  the type of sql object to create.
@param handleSupplier the Handle instance to attach this sql object to.
@return the new sql object bound to this handle.
sqlobject/src/main/java/org/jdbi/v3/sqlobject/GeneratorSqlObjectFactory.java