Polish Kotlin source code style
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.beans.factory
|
||||
|
||||
|
||||
/**
|
||||
* Extension for [BeanFactory.getBean] providing a `getBean<Foo>()` variant.
|
||||
*
|
||||
|
||||
@@ -17,13 +17,15 @@
|
||||
package org.springframework.beans.factory
|
||||
|
||||
/**
|
||||
* Extension for [ListableBeanFactory.getBeanNamesForType] providing a `getBeanNamesForType<Foo>()` variant.
|
||||
* Extension for [ListableBeanFactory.getBeanNamesForType] providing a
|
||||
* `getBeanNamesForType<Foo>()` variant.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
*/
|
||||
inline fun <reified T : Any> ListableBeanFactory.getBeanNamesForType(includeNonSingletons: Boolean = true, allowEagerInit: Boolean = true): Array<out String> =
|
||||
getBeanNamesForType(T::class.java, includeNonSingletons, allowEagerInit)
|
||||
inline fun <reified T : Any> ListableBeanFactory.getBeanNamesForType(includeNonSingletons: Boolean = true,
|
||||
allowEagerInit: Boolean = true): Array<out String> =
|
||||
getBeanNamesForType(T::class.java, includeNonSingletons, allowEagerInit)
|
||||
|
||||
/**
|
||||
* Extension for [ListableBeanFactory.getBeansOfType] providing a `getBeansOfType<Foo>()` variant.
|
||||
@@ -31,11 +33,13 @@ inline fun <reified T : Any> ListableBeanFactory.getBeanNamesForType(includeNonS
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
*/
|
||||
inline fun <reified T : Any> ListableBeanFactory.getBeansOfType(includeNonSingletons: Boolean = true, allowEagerInit: Boolean = true): Map<String, T> =
|
||||
getBeansOfType(T::class.java, includeNonSingletons, allowEagerInit)
|
||||
inline fun <reified T : Any> ListableBeanFactory.getBeansOfType(includeNonSingletons: Boolean = true,
|
||||
allowEagerInit: Boolean = true): Map<String, T> =
|
||||
getBeansOfType(T::class.java, includeNonSingletons, allowEagerInit)
|
||||
|
||||
/**
|
||||
* Extension for [ListableBeanFactory.getBeanNamesForAnnotation] providing a `getBeansOfType<Foo>()` variant.
|
||||
* Extension for [ListableBeanFactory.getBeanNamesForAnnotation] providing a
|
||||
* `getBeansOfType<Foo>()` variant.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
@@ -44,7 +48,8 @@ inline fun <reified T : Annotation> ListableBeanFactory.getBeanNamesForAnnotatio
|
||||
getBeanNamesForAnnotation(T::class.java)
|
||||
|
||||
/**
|
||||
* Extension for [ListableBeanFactory.getBeansWithAnnotation] providing a `getBeansWithAnnotation<Foo>()` variant.
|
||||
* Extension for [ListableBeanFactory.getBeansWithAnnotation] providing a
|
||||
* `getBeansWithAnnotation<Foo>()` variant.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
@@ -53,7 +58,8 @@ inline fun <reified T : Annotation> ListableBeanFactory.getBeansWithAnnotation()
|
||||
getBeansWithAnnotation(T::class.java)
|
||||
|
||||
/**
|
||||
* Extension for [ListableBeanFactory.findAnnotationOnBean] providing a `findAnnotationOnBean<Foo>("foo")` variant.
|
||||
* Extension for [ListableBeanFactory.findAnnotationOnBean] providing a
|
||||
* `findAnnotationOnBean<Foo>("foo")` variant.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.junit.Assert.*
|
||||
import org.junit.Test
|
||||
|
||||
/**
|
||||
* Kotlin tests for {@link BeanUtils}
|
||||
* Kotlin tests for {@link BeanUtils}.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.mockito.Mockito.*
|
||||
import org.mockito.junit.MockitoJUnitRunner
|
||||
|
||||
/**
|
||||
* Mock object based tests for BeanFactory Kotlin extensions
|
||||
* Mock object based tests for BeanFactory Kotlin extensions.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
*/
|
||||
|
||||
@@ -231,7 +231,8 @@ class KotlinAutowiredTests {
|
||||
val optional: String = "foo",
|
||||
val injectedFromConstructor: TestBean
|
||||
) {
|
||||
@Autowired constructor(injectedFromSecondaryConstructor: Colour, injectedFromConstructor: TestBean, optional: String = "bar") : this(optional, injectedFromConstructor) {
|
||||
@Autowired constructor(injectedFromSecondaryConstructor: Colour, injectedFromConstructor: TestBean,
|
||||
optional: String = "bar") : this(optional, injectedFromConstructor) {
|
||||
this.injectedFromSecondaryConstructor = injectedFromSecondaryConstructor
|
||||
}
|
||||
|
||||
@@ -247,7 +248,8 @@ class KotlinAutowiredTests {
|
||||
val optional: String = "foo",
|
||||
val injectedFromConstructor: TestBean
|
||||
) {
|
||||
constructor(injectedFromSecondaryConstructor: Colour, injectedFromConstructor: TestBean, optional: String = "bar") : this(optional, injectedFromConstructor) {
|
||||
constructor(injectedFromSecondaryConstructor: Colour, injectedFromConstructor: TestBean,
|
||||
optional: String = "bar") : this(optional, injectedFromConstructor) {
|
||||
this.injectedFromSecondaryConstructor = injectedFromSecondaryConstructor
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user