@ -380,6 +380,694 @@ open class BeanRegistrarDsl(private val init: BeanRegistrarDsl.() -> Unit): Bean
@@ -380,6 +380,694 @@ open class BeanRegistrarDsl(private val init: BeanRegistrarDsl.() -> Unit): Bean
return registry . registerBean ( T :: class . java , customizer )
}
// Function with 0 parameter
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] .
* @param T the bean type
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified 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 ) =
registerBean ( autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( )
}
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] .
* @param T the bean type
* @param name the name of the bean
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified 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 ) =
registerBean ( name , autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( )
}
// Function with 1 parameter
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified 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 ) =
registerBean ( autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) )
}
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param name the name of the bean
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified 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 ) =
registerBean ( name , autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) )
}
// Function with 2 parameters
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified 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 ) =
registerBean ( autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) )
}
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param name the name of the bean
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified 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 ) =
registerBean ( name , autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) )
}
// Function with 3 parameters
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified B : Any , reified 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 ) =
registerBean ( autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) , bean ( ) )
}
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param name the name of the bean
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified B : Any , reified 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 ) =
registerBean ( name , autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) , bean ( ) )
}
// Function with 4 parameters
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified B : Any , reified C : Any , reified 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 ) =
registerBean ( autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) , bean ( ) , bean ( ) )
}
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param name the name of the bean
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified B : Any , reified C : Any , reified 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 ) =
registerBean ( name , autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) , bean ( ) , bean ( ) )
}
// Function with 5 parameters
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified B : Any , reified C : Any , reified D : Any , reified 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 ) =
registerBean ( autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) )
}
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param name the name of the bean
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified B : Any , reified C : Any , reified D : Any , reified 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 ) =
registerBean ( name , autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) )
}
// Function with 6 parameters
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified B : Any , reified C : Any , reified D : Any , reified E : Any ,
reified 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 ) =
registerBean ( autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) )
}
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param name the name of the bean
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified B : Any , reified C : Any , reified D : Any , reified E : Any ,
reified 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 ) =
registerBean ( name , autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) )
}
// Function with 7 parameters
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified B : Any , reified C : Any , reified D : Any , reified E : Any ,
reified F : Any , reified 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 ) =
registerBean ( autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) )
}
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param name the name of the bean
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified B : Any , reified C : Any , reified D : Any , reified E : Any ,
reified F : Any , reified 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 ) =
registerBean ( name , autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) )
}
// Function with 8 parameters
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified B : Any , reified C : Any , reified D : Any , reified E : Any ,
reified F : Any , reified G : Any , reified 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 ) =
registerBean ( autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) )
}
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param name the name of the bean
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified B : Any , reified C : Any , reified D : Any , reified E : Any ,
reified F : Any , reified G : Any , reified 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 ) =
registerBean ( name , autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) )
}
// Function with 9 parameters
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified B : Any , reified C : Any , reified D : Any , reified E : Any ,
reified F : Any , reified G : Any , reified H : Any , reified 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 ) =
registerBean ( autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) )
}
/ * *
* Register a bean of type [ T ] which will be instantiated by invoking the
* provided [ function ] [ f ] with its parameters autowired by type .
* @param T the bean type
* @param name the name of the bean
* @param autowirable set whether this bean is a candidate for getting
* autowired into some other bean
* @param backgroundInit set whether this bean allows for instantiation
* on a background thread
* @param description a human - readable description of this bean
* @param fallback set whether this bean is a fallback autowire candidate
* @param infrastructure set whether this bean has an infrastructure role ,
* meaning it has no relevance to the end - user
* @param lazyInit set whether this bean is lazily initialized
* @param order the sort order of this bean
* @param primary set whether this bean is a primary autowire candidate
* @param prototype set whether this bean has a prototype scope
* /
inline fun < reified T : Any , reified A : Any , reified B : Any , reified C : Any , reified D : Any , reified E : Any ,
reified F : Any , reified G : Any , reified H : Any , reified 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 ) =
registerBean ( name , autowirable , backgroundInit , description , fallback , infrastructure , lazyInit , order , primary , prototype ) {
f . invoke ( bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) , bean ( ) )
}
/ * *
* Context available from the bean instance supplier designed to give access