Make Kotlin DSL class constructors internal
Closes gh-24059
This commit is contained in:
parent
dc0ebefc56
commit
6c7250b0ae
|
@ -76,7 +76,7 @@ fun beans(init: BeanDefinitionDsl.() -> Unit) = BeanDefinitionDsl(init)
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
* @since 5.0
|
* @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 })
|
private val condition: (ConfigurableEnvironment) -> Boolean = { true })
|
||||||
: ApplicationContextInitializer<GenericApplicationContext> {
|
: ApplicationContextInitializer<GenericApplicationContext> {
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ import javax.servlet.http.Cookie
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
* @since 5.2
|
* @since 5.2
|
||||||
*/
|
*/
|
||||||
open class MockHttpServletRequestDsl(private val builder: MockHttpServletRequestBuilder) {
|
open class MockHttpServletRequestDsl internal constructor (private val builder: MockHttpServletRequestBuilder) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see [MockHttpServletRequestBuilder.contextPath]
|
* @see [MockHttpServletRequestBuilder.contextPath]
|
||||||
|
|
|
@ -27,7 +27,7 @@ import javax.servlet.http.Part
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
* @since 5.2
|
* @since 5.2
|
||||||
*/
|
*/
|
||||||
class MockMultipartHttpServletRequestDsl(private val builder: MockMultipartHttpServletRequestBuilder) : MockHttpServletRequestDsl(builder) {
|
class MockMultipartHttpServletRequestDsl internal constructor (private val builder: MockMultipartHttpServletRequestBuilder) : MockHttpServletRequestDsl(builder) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see [MockMultipartHttpServletRequestBuilder.file]
|
* @see [MockMultipartHttpServletRequestBuilder.file]
|
||||||
|
|
|
@ -26,7 +26,7 @@ import java.io.Writer
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
* @since 5.2
|
* @since 5.2
|
||||||
*/
|
*/
|
||||||
class MockMvcResultHandlersDsl(private val actions: ResultActions) {
|
class MockMvcResultHandlersDsl internal constructor (private val actions: ResultActions) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see MockMvcResultHandlers.print
|
* @see MockMvcResultHandlers.print
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.springframework.test.web.servlet.result.*
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
* @since 5.2
|
* @since 5.2
|
||||||
*/
|
*/
|
||||||
class MockMvcResultMatchersDsl(private val actions: ResultActions) {
|
class MockMvcResultMatchersDsl internal constructor (private val actions: ResultActions) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see MockMvcResultMatchers.request
|
* @see MockMvcResultMatchers.request
|
||||||
|
|
|
@ -8,7 +8,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
* @since 5.2
|
* @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.
|
* Provide access to [MockMvcResultMatchersDsl] Kotlin DSL.
|
||||||
|
|
|
@ -63,7 +63,7 @@ fun coRouter(routes: (CoRouterFunctionDsl.() -> Unit)) =
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
* @since 5.2
|
* @since 5.2
|
||||||
*/
|
*/
|
||||||
class CoRouterFunctionDsl(private val init: (CoRouterFunctionDsl.() -> Unit)) {
|
class CoRouterFunctionDsl internal constructor (private val init: (CoRouterFunctionDsl.() -> Unit)) {
|
||||||
|
|
||||||
@PublishedApi
|
@PublishedApi
|
||||||
internal val builder = RouterFunctions.route()
|
internal val builder = RouterFunctions.route()
|
||||||
|
|
|
@ -60,7 +60,7 @@ fun router(routes: RouterFunctionDsl.() -> Unit) = RouterFunctionDsl(routes).bui
|
||||||
* @author Yevhenii Melnyk
|
* @author Yevhenii Melnyk
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
*/
|
*/
|
||||||
class RouterFunctionDsl(private val init: RouterFunctionDsl.() -> Unit) {
|
class RouterFunctionDsl internal constructor (private val init: RouterFunctionDsl.() -> Unit) {
|
||||||
|
|
||||||
@PublishedApi
|
@PublishedApi
|
||||||
internal val builder = RouterFunctions.route()
|
internal val builder = RouterFunctions.route()
|
||||||
|
|
|
@ -58,7 +58,7 @@ fun router(routes: (RouterFunctionDsl.() -> Unit)) = RouterFunctionDsl(routes).b
|
||||||
* @author Sebastien Deleuze
|
* @author Sebastien Deleuze
|
||||||
* @since 5.2
|
* @since 5.2
|
||||||
*/
|
*/
|
||||||
class RouterFunctionDsl(private val init: (RouterFunctionDsl.() -> Unit)) {
|
class RouterFunctionDsl internal constructor (private val init: (RouterFunctionDsl.() -> Unit)) {
|
||||||
|
|
||||||
@PublishedApi
|
@PublishedApi
|
||||||
internal val builder = RouterFunctions.route()
|
internal val builder = RouterFunctions.route()
|
||||||
|
|
Loading…
Reference in New Issue