registerBean

inline fun <T : Any> registerBean(name: String, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false)

Register a bean of type T which will be instantiated using the related resolvable constructor if any.

Parameters

T

the bean type

name

the name of the bean

autowirable

set whether this bean is a candidate for getting autowired into some other bean

backgroundInit

set whether this bean allows for instantiation on a background thread

description

a human-readable description of this bean

fallback

set whether this bean is a fallback autowire candidate

infrastructure

set whether this bean has an infrastructure role, meaning it has no relevance to the end-user

lazyInit

set whether this bean is lazily initialized

order

the sort order of this bean

primary

set whether this bean is a primary autowire candidate

prototype

set whether this bean has a prototype scope


inline fun <T : Any> registerBean(autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false): String

Register a bean of type T which will be instantiated using the related resolvable constructor if any.

Return

the generated bean name

Parameters

T

the bean type

autowirable

set whether this bean is a candidate for getting autowired into some other bean

backgroundInit

set whether this bean allows for instantiation on a background thread

description

a human-readable description of this bean

fallback

set whether this bean is a fallback autowire candidate

infrastructure

set whether this bean has an infrastructure role, meaning it has no relevance to the end-user

lazyInit

set whether this bean is lazily initialized

order

the sort order of this bean

primary

set whether this bean is a primary autowire candidate

prototype

set whether this bean has a prototype scope


inline fun <T : Any> registerBean(name: String, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false, crossinline supplier: BeanRegistrarDsl.SupplierContextDsl<T>.() -> T)

Register a bean of type T which will be instantiated using the provided supplier.

Parameters

T

the bean type

name

the name of the bean

autowirable

set whether this bean is a candidate for getting autowired into some other bean

backgroundInit

set whether this bean allows for instantiation on a background thread

description

a human-readable description of this bean

fallback

set whether this bean is a fallback autowire candidate

infrastructure

set whether this bean has an infrastructure role, meaning it has no relevance to the end-user

lazyInit

set whether this bean is lazily initialized

order

the sort order of this bean

primary

set whether this bean is a primary autowire candidate

prototype

set whether this bean has a prototype scope

supplier

the supplier to construct a bean instance


inline fun <T : Any> registerBean(autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false, crossinline supplier: BeanRegistrarDsl.SupplierContextDsl<T>.() -> T): String


inline fun <T : Any> registerBean(crossinline f: () -> T, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false): String

Register a bean of type T which will be instantiated by invoking the provided function.

Parameters

T

the bean type

autowirable

set whether this bean is a candidate for getting autowired into some other bean

backgroundInit

set whether this bean allows for instantiation on a background thread

description

a human-readable description of this bean

fallback

set whether this bean is a fallback autowire candidate

infrastructure

set whether this bean has an infrastructure role, meaning it has no relevance to the end-user

lazyInit

set whether this bean is lazily initialized

order

the sort order of this bean

primary

set whether this bean is a primary autowire candidate

prototype

set whether this bean has a prototype scope


inline fun <T : Any> registerBean(crossinline f: () -> T, name: String, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false)

Register a bean of type T which will be instantiated by invoking the provided function.

Parameters

T

the bean type

name

the name of the bean

autowirable

set whether this bean is a candidate for getting autowired into some other bean

backgroundInit

set whether this bean allows for instantiation on a background thread

description

a human-readable description of this bean

fallback

set whether this bean is a fallback autowire candidate

infrastructure

set whether this bean has an infrastructure role, meaning it has no relevance to the end-user

lazyInit

set whether this bean is lazily initialized

order

the sort order of this bean

primary

set whether this bean is a primary autowire candidate

prototype

set whether this bean has a prototype scope


inline fun <T : Any, A : Any> registerBean(crossinline f: (A) -> T, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false): String
inline fun <T : Any, A : Any, B : Any> registerBean(crossinline f: (A, B) -> T, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false): String
inline fun <T : Any, A : Any, B : Any, C : Any> registerBean(crossinline f: (A, B, C) -> T, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false): String
inline fun <T : Any, A : Any, B : Any, C : Any, D : Any> registerBean(crossinline f: (A, B, C, D) -> T, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false): String
inline fun <T : Any, A : Any, B : Any, C : Any, D : Any, E : Any> registerBean(crossinline f: (A, B, C, D, E) -> T, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false): String
inline fun <T : Any, A : Any, B : Any, C : Any, D : Any, E : Any, F : Any> registerBean(crossinline f: (A, B, C, D, E, F) -> T, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false): String
inline fun <T : Any, A : Any, B : Any, C : Any, D : Any, E : Any, F : Any, G : Any> registerBean(crossinline f: (A, B, C, D, E, F, G) -> T, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false): String
inline fun <T : Any, A : Any, B : Any, C : Any, D : Any, E : Any, F : Any, G : Any, H : Any> registerBean(crossinline f: (A, B, C, D, E, F, G, H) -> T, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false): String
inline fun <T : Any, A : Any, B : Any, C : Any, D : Any, E : Any, F : Any, G : Any, H : Any, I : Any> registerBean(crossinline f: (A, B, C, D, E, F, G, H, I) -> T, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false): String

Register a bean of type T which will be instantiated by invoking the provided function with its parameters autowired by type.

Parameters

T

the bean type

autowirable

set whether this bean is a candidate for getting autowired into some other bean

backgroundInit

set whether this bean allows for instantiation on a background thread

description

a human-readable description of this bean

fallback

set whether this bean is a fallback autowire candidate

infrastructure

set whether this bean has an infrastructure role, meaning it has no relevance to the end-user

lazyInit

set whether this bean is lazily initialized

order

the sort order of this bean

primary

set whether this bean is a primary autowire candidate

prototype

set whether this bean has a prototype scope


inline fun <T : Any, A : Any> registerBean(crossinline f: (A) -> T, name: String, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false)
inline fun <T : Any, A : Any, B : Any> registerBean(crossinline f: (A, B) -> T, name: String, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false)
inline fun <T : Any, A : Any, B : Any, C : Any> registerBean(crossinline f: (A, B, C) -> T, name: String, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false)
inline fun <T : Any, A : Any, B : Any, C : Any, D : Any> registerBean(crossinline f: (A, B, C, D) -> T, name: String, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false)
inline fun <T : Any, A : Any, B : Any, C : Any, D : Any, E : Any> registerBean(crossinline f: (A, B, C, D, E) -> T, name: String, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false)
inline fun <T : Any, A : Any, B : Any, C : Any, D : Any, E : Any, F : Any> registerBean(crossinline f: (A, B, C, D, E, F) -> T, name: String, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false)
inline fun <T : Any, A : Any, B : Any, C : Any, D : Any, E : Any, F : Any, G : Any> registerBean(crossinline f: (A, B, C, D, E, F, G) -> T, name: String, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false)
inline fun <T : Any, A : Any, B : Any, C : Any, D : Any, E : Any, F : Any, G : Any, H : Any> registerBean(crossinline f: (A, B, C, D, E, F, G, H) -> T, name: String, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false)
inline fun <T : Any, A : Any, B : Any, C : Any, D : Any, E : Any, F : Any, G : Any, H : Any, I : Any> registerBean(crossinline f: (A, B, C, D, E, F, G, H, I) -> T, name: String, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false)

Register a bean of type T which will be instantiated by invoking the provided function with its parameters autowired by type.

Parameters

T

the bean type

name

the name of the bean

autowirable

set whether this bean is a candidate for getting autowired into some other bean

backgroundInit

set whether this bean allows for instantiation on a background thread

description

a human-readable description of this bean

fallback

set whether this bean is a fallback autowire candidate

infrastructure

set whether this bean has an infrastructure role, meaning it has no relevance to the end-user

lazyInit

set whether this bean is lazily initialized

order

the sort order of this bean

primary

set whether this bean is a primary autowire candidate

prototype

set whether this bean has a prototype scope