Skip to content

Commit

Permalink
Make Kotlin DSL class constructors internal
Browse files Browse the repository at this point in the history
Closes gh-24059
  • Loading branch information
sdeleuze committed Nov 22, 2019
1 parent dc0ebef commit 6c7250b
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
Expand Up @@ -76,7 +76,7 @@ fun beans(init: BeanDefinitionDsl.() -> Unit) = BeanDefinitionDsl(init)
* @author Sebastien Deleuze
* @since 5.0
*/
open class BeanDefinitionDsl(private val init: BeanDefinitionDsl.() -> Unit,
open class BeanDefinitionDsl internal constructor (private val init: BeanDefinitionDsl.() -> Unit,
private val condition: (ConfigurableEnvironment) -> Boolean = { true })
: ApplicationContextInitializer<GenericApplicationContext> {

Expand Down
Expand Up @@ -40,7 +40,7 @@ import javax.servlet.http.Cookie
* @author Sebastien Deleuze
* @since 5.2
*/
open class MockHttpServletRequestDsl(private val builder: MockHttpServletRequestBuilder) {
open class MockHttpServletRequestDsl internal constructor (private val builder: MockHttpServletRequestBuilder) {

/**
* @see [MockHttpServletRequestBuilder.contextPath]
Expand Down
Expand Up @@ -27,7 +27,7 @@ import javax.servlet.http.Part
* @author Sebastien Deleuze
* @since 5.2
*/
class MockMultipartHttpServletRequestDsl(private val builder: MockMultipartHttpServletRequestBuilder) : MockHttpServletRequestDsl(builder) {
class MockMultipartHttpServletRequestDsl internal constructor (private val builder: MockMultipartHttpServletRequestBuilder) : MockHttpServletRequestDsl(builder) {

/**
* @see [MockMultipartHttpServletRequestBuilder.file]
Expand Down
Expand Up @@ -26,7 +26,7 @@ import java.io.Writer
* @author Sebastien Deleuze
* @since 5.2
*/
class MockMvcResultHandlersDsl(private val actions: ResultActions) {
class MockMvcResultHandlersDsl internal constructor (private val actions: ResultActions) {

/**
* @see MockMvcResultHandlers.print
Expand Down
Expand Up @@ -25,7 +25,7 @@ import org.springframework.test.web.servlet.result.*
* @author Sebastien Deleuze
* @since 5.2
*/
class MockMvcResultMatchersDsl(private val actions: ResultActions) {
class MockMvcResultMatchersDsl internal constructor (private val actions: ResultActions) {

/**
* @see MockMvcResultMatchers.request
Expand Down
Expand Up @@ -8,7 +8,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders
* @author Sebastien Deleuze
* @since 5.2
*/
class ResultActionsDsl(private val actions: ResultActions, private val mockMvc: MockMvc) {
class ResultActionsDsl internal constructor (private val actions: ResultActions, private val mockMvc: MockMvc) {

/**
* Provide access to [MockMvcResultMatchersDsl] Kotlin DSL.
Expand Down
Expand Up @@ -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()
Expand Down
Expand Up @@ -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()
Expand Down
Expand Up @@ -58,7 +58,7 @@ fun router(routes: (RouterFunctionDsl.() -> Unit)) = RouterFunctionDsl(routes).b
* @author Sebastien Deleuze
* @since 5.2
*/
class RouterFunctionDsl(private val init: (RouterFunctionDsl.() -> Unit)) {
class RouterFunctionDsl internal constructor (private val init: (RouterFunctionDsl.() -> Unit)) {

@PublishedApi
internal val builder = RouterFunctions.route()
Expand Down

0 comments on commit 6c7250b

Please sign in to comment.