KontainerBuilder

class KontainerBuilder

Types

Link copied to clipboard
class InjectionTypeUpgrade

Functions

Link copied to clipboard
fun config(id: String, value: Boolean): KontainerBuilder
fun config(id: String, value: Double): KontainerBuilder
fun config(id: String, value: Float): KontainerBuilder
fun config(id: String, value: Int): KontainerBuilder
fun config(id: String, value: Long): KontainerBuilder
fun config(id: String, value: String): KontainerBuilder

Sets an injectable config value

Link copied to clipboard
fun <SRV : Any> dynamic(srv: KClass<SRV>): KontainerBuilder

Registers a dynamic service

fun <SRV : Any, IMPL : SRV, FAC : Function<IMPL>> dynamic(srv: KClass<SRV>, factory: FAC): KontainerBuilder

Registers a dynamic service with variable number of parameters

fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> dynamic(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> dynamic(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12> dynamic(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13> dynamic(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14> dynamic(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> dynamic(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16> dynamic(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1> dynamic(srv: KClass<SRV>, factory: (P1) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2> dynamic(srv: KClass<SRV>, factory: (P1, P2) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3> dynamic(srv: KClass<SRV>, factory: (P1, P2, P3) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4> dynamic(srv: KClass<SRV>, factory: (P1, P2, P3, P4) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5> dynamic(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6> dynamic(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7> dynamic(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8> dynamic(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9> dynamic(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9) -> IMPL): KontainerBuilder

Create a dynamic service via a factory

fun <SRV : Any, IMPL : SRV> dynamic(srv: KClass<SRV>, impl: KClass<IMPL>): KontainerBuilder

Registers a dynamic service SRV with a default implementation IMPL

Link copied to clipboard
fun <SRV : Any, IMPL : SRV> dynamic0(srv: KClass<SRV>, factory: () -> IMPL): KontainerBuilder

Create a dynamic singleton via a factory method with 0 injected parameters

Link copied to clipboard
fun <SRV : Any> instance(instance: SRV): KontainerBuilder
fun <SRV : Any, IMPL : SRV> instance(srv: KClass<SRV>, instance: IMPL): KontainerBuilder

Register an already existing instance as a service

Link copied to clipboard
fun module(module: KontainerModule): KontainerBuilder

Imports a module

fun <P> module(module: ParameterizedKontainerModule<P>, param: P): KontainerBuilder
fun <P1, P2> module(    module: ParameterizedKontainerModule2<P1, P2>,     p1: P1,     p2: P2): KontainerBuilder
fun <P1, P2, P3> module(    module: ParameterizedKontainerModule3<P1, P2, P3>,     p1: P1,     p2: P2,     p3: P3): KontainerBuilder

Imports a parameterized module

Link copied to clipboard
fun <SRV : Any> prototype(srv: KClass<SRV>): KontainerBuilder
fun <SRV : Any, IMPL : SRV> prototype(srv: KClass<SRV>, impl: KClass<IMPL>): KontainerBuilder

Registers a prototype service

fun <SRV : Any, IMPL : SRV, FAC : Function<IMPL>> prototype(srv: KClass<SRV>, factory: FAC): KontainerBuilder

Registers a prototype service with variable number of parameters

fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> prototype(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> prototype(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12> prototype(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13> prototype(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14> prototype(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> prototype(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16> prototype(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1> prototype(srv: KClass<SRV>, factory: (P1) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2> prototype(srv: KClass<SRV>, factory: (P1, P2) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3> prototype(srv: KClass<SRV>, factory: (P1, P2, P3) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4> prototype(srv: KClass<SRV>, factory: (P1, P2, P3, P4) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5> prototype(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6> prototype(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7> prototype(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8> prototype(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9> prototype(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9) -> IMPL): KontainerBuilder

Create a prototype via a factory

Link copied to clipboard
fun <SRV : Any, IMPL : SRV> prototype0(srv: KClass<SRV>, factory: () -> IMPL): KontainerBuilder

Create a Prototype via a factory method with 0 injected parameters

Link copied to clipboard
fun <SRV : Any> singleton(srv: KClass<SRV>): KontainerBuilder
fun <SRV : Any, IMPL : SRV> singleton(srv: KClass<SRV>, impl: KClass<IMPL>): KontainerBuilder

Registers a singleton service

fun <SRV : Any, IMPL : SRV, FAC : Function<IMPL>> singleton(srv: KClass<SRV>, factory: FAC): KontainerBuilder

Registers a singleton service with variable number of parameters

fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> singleton(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> singleton(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12> singleton(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13> singleton(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14> singleton(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15> singleton(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16> singleton(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1> singleton(srv: KClass<SRV>, factory: (P1) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2> singleton(srv: KClass<SRV>, factory: (P1, P2) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3> singleton(srv: KClass<SRV>, factory: (P1, P2, P3) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4> singleton(srv: KClass<SRV>, factory: (P1, P2, P3, P4) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5> singleton(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6> singleton(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7> singleton(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8> singleton(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8) -> IMPL): KontainerBuilder
fun <SRV : Any, IMPL : SRV, P1, P2, P3, P4, P5, P6, P7, P8, P9> singleton(srv: KClass<SRV>, factory: (P1, P2, P3, P4, P5, P6, P7, P8, P9) -> IMPL): KontainerBuilder

Create a singleton via a factory

Link copied to clipboard
fun <SRV : Any, IMPL : SRV> singleton0(srv: KClass<SRV>, factory: () -> IMPL): KontainerBuilder

Create a singleton via a factory method with 0 injected parameters