orangy
GenericApplicationContext
could be useful:
val c = GenericApplicationContext {
registerBean<A>()
registerBean<B>()
}
that would be something like
fun GenericApplicationContext(configure: GenericApplicationContext.()->Unit) = GenericApplicationContext().apply(configure)