decorate

fun <T : Publication.Service> decorate(serviceType: KClass<T>, transform: (ServiceFactory?) -> ServiceFactory)

Replaces the service factory associated with the given service type with the result of transform.