Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BoundedContextBuilder.add(entityClass: KClass<out E>) extension function #1545

Open
alexander-yevsyukov opened this issue Jan 4, 2024 · 0 comments

Comments

@alexander-yevsyukov
Copy link
Contributor

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)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant