core-java
core-java copied to clipboard
`BoundedContextBuilder.add(entityClass: KClass<out E>)` extension function
The function proved to be useful when working in McJava. It just makes the Kotlin backend code more idiomatic.
The exact code to be added is this:
/**
* Adds specified entity class to this `BoundedContextBuilder`.
*/
public inline fun <reified I, reified E : Entity<I, *>>
BoundedContextBuilder.add(entityClass: KClass<out E>) {
add(entityClass.java)
}