Make Kotlin DSL class constructors internal

Closes gh-24059
This commit is contained in:
Sébastien Deleuze
2019-11-22 16:10:42 +01:00
parent dc0ebefc56
commit 6c7250b0ae
9 changed files with 9 additions and 9 deletions

View File

@@ -63,7 +63,7 @@ fun coRouter(routes: (CoRouterFunctionDsl.() -> Unit)) =
* @author Sebastien Deleuze
* @since 5.2
*/
class CoRouterFunctionDsl(private val init: (CoRouterFunctionDsl.() -> Unit)) {
class CoRouterFunctionDsl internal constructor (private val init: (CoRouterFunctionDsl.() -> Unit)) {
@PublishedApi
internal val builder = RouterFunctions.route()

View File

@@ -60,7 +60,7 @@ fun router(routes: RouterFunctionDsl.() -> Unit) = RouterFunctionDsl(routes).bui
* @author Yevhenii Melnyk
* @since 5.0
*/
class RouterFunctionDsl(private val init: RouterFunctionDsl.() -> Unit) {
class RouterFunctionDsl internal constructor (private val init: RouterFunctionDsl.() -> Unit) {
@PublishedApi
internal val builder = RouterFunctions.route()