diff --git a/spring-context/src/main/kotlin/org/springframework/context/support/BeanDefinitionDsl.kt b/spring-context/src/main/kotlin/org/springframework/context/support/BeanDefinitionDsl.kt index 02243ab8ba3e..19bf94c0384c 100644 --- a/spring-context/src/main/kotlin/org/springframework/context/support/BeanDefinitionDsl.kt +++ b/spring-context/src/main/kotlin/org/springframework/context/support/BeanDefinitionDsl.kt @@ -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 { diff --git a/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockHttpServletRequestDsl.kt b/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockHttpServletRequestDsl.kt index 7226d319b750..20bb0a0c9907 100644 --- a/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockHttpServletRequestDsl.kt +++ b/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockHttpServletRequestDsl.kt @@ -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] diff --git a/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMultipartHttpServletRequestDsl.kt b/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMultipartHttpServletRequestDsl.kt index 503cae568200..1a2e83745a7d 100644 --- a/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMultipartHttpServletRequestDsl.kt +++ b/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMultipartHttpServletRequestDsl.kt @@ -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] diff --git a/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMvcResultHandlersDsl.kt b/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMvcResultHandlersDsl.kt index 72727ed14b20..c493b450de7d 100644 --- a/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMvcResultHandlersDsl.kt +++ b/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMvcResultHandlersDsl.kt @@ -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 diff --git a/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMvcResultMatchersDsl.kt b/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMvcResultMatchersDsl.kt index b34f158afa81..6a5d90902589 100644 --- a/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMvcResultMatchersDsl.kt +++ b/spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMvcResultMatchersDsl.kt @@ -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 diff --git a/spring-test/src/main/kotlin/org/springframework/test/web/servlet/ResultActionsDsl.kt b/spring-test/src/main/kotlin/org/springframework/test/web/servlet/ResultActionsDsl.kt index 5c54df36d327..128b9492b8c4 100644 --- a/spring-test/src/main/kotlin/org/springframework/test/web/servlet/ResultActionsDsl.kt +++ b/spring-test/src/main/kotlin/org/springframework/test/web/servlet/ResultActionsDsl.kt @@ -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. diff --git a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt index 2477e74475a9..e0724db28d01 100644 --- a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt +++ b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt @@ -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() diff --git a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDsl.kt b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDsl.kt index 305ccabee49a..69ead9e87e7b 100644 --- a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDsl.kt +++ b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDsl.kt @@ -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() diff --git a/spring-webmvc/src/main/kotlin/org/springframework/web/servlet/function/RouterFunctionDsl.kt b/spring-webmvc/src/main/kotlin/org/springframework/web/servlet/function/RouterFunctionDsl.kt index 1ae9e0488a9f..d4cb76d638a6 100644 --- a/spring-webmvc/src/main/kotlin/org/springframework/web/servlet/function/RouterFunctionDsl.kt +++ b/spring-webmvc/src/main/kotlin/org/springframework/web/servlet/function/RouterFunctionDsl.kt @@ -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()