spring-framework
5.3.39

# Package org.springframework.beans.factory

## Functions

findAnnotationOnBean
Link copied to clipboard
inline fun <T : Annotation> ListableBeanFactory.findAnnotationOnBean(beanName: String): T?
Content copied to clipboard

Extension for ListableBeanFactory.findAnnotationOnBean providing a `findAnnotationOnBean<Foo>("foo")` variant.

getBean
Link copied to clipboard
inline fun <T : Any> BeanFactory.getBean(): T
Content copied to clipboard

Extension for BeanFactory.getBean providing a `getBean<Foo>()` variant.

inline fun <T : Any> BeanFactory.getBean(vararg args: Any): T
Content copied to clipboard

Extension for BeanFactory.getBean providing a `getBean<Foo>(arg1, arg2)` variant.

inline fun <T : Any> BeanFactory.getBean(name: String): T
Content copied to clipboard

Extension for BeanFactory.getBean providing a `getBean<Foo>("foo")` variant.

getBeanNamesForAnnotation
Link copied to clipboard
inline fun <T : Annotation> ListableBeanFactory.getBeanNamesForAnnotation(): Array<out String>
Content copied to clipboard

Extension for ListableBeanFactory.getBeanNamesForAnnotation providing a `getBeanNamesForAnnotation<Foo>()` variant.

getBeanNamesForType
Link copied to clipboard
inline fun <T : Any> ListableBeanFactory.getBeanNamesForType(includeNonSingletons: Boolean = true, allowEagerInit: Boolean = true): Array<out String>
Content copied to clipboard

Extension for ListableBeanFactory.getBeanNamesForType providing a `getBeanNamesForType<Foo>()` variant.

getBeanProvider
Link copied to clipboard
inline fun <T : Any> BeanFactory.getBeanProvider(): ObjectProvider<T>
Content copied to clipboard

Extension for BeanFactory.getBeanProvider providing a `getBeanProvider<Foo>()` variant. This extension is not subject to type erasure and retains actual generic type arguments.

getBeansOfType
Link copied to clipboard
inline fun <T : Any> ListableBeanFactory.getBeansOfType(includeNonSingletons: Boolean = true, allowEagerInit: Boolean = true): Map<String, T>
Content copied to clipboard

Extension for ListableBeanFactory.getBeansOfType providing a `getBeansOfType<Foo>()` variant.

getBeansWithAnnotation
Link copied to clipboard
inline fun <T : Annotation> ListableBeanFactory.getBeansWithAnnotation(): Map<String, Any>
Content copied to clipboard

Extension for ListableBeanFactory.getBeansWithAnnotation providing a `getBeansWithAnnotation<Foo>()` variant.