BService Config Builder
Functions
Link copied to clipboard
Registers a supplier lazily returning an instance of the specified class, the instance is then made available via dependency injection.
Link copied to clipboard
inline fun <T : Any> BServiceConfigBuilder.registerInstanceSupplier(instanceSupplier: InstanceSupplier<T>)
Registers a supplier lazily returning an instance of the specified class, the instance is then made available via dependency injection.
Link copied to clipboard
fun <T : Any> registerServiceSupplier(primaryType: KClass<T>, name: String = ServiceSupplier.defaultName(primaryType), additionalTypes: Set<KClass<in T>> = emptySet(), isPrimary: Boolean = false, isLazy: Boolean = false, priority: Int = 0, annotations: List<Annotation> = emptyList(), supplier: (BContext) -> T)
Registers a supplier which gets loaded in the same manner as annotated service classes/factories.
Link copied to clipboard
inline fun <T : Any> BServiceConfigBuilder.registerServiceSupplier(name: String = ServiceSupplier.defaultName(T::class), additionalTypes: Set<KClass<in T>> = emptySet(), isPrimary: Boolean = false, isLazy: Boolean = false, priority: Int = 0, annotations: List<Annotation> = emptyList(), noinline supplier: (BContext) -> T)
Registers a supplier which gets loaded in the same manner as annotated service classes/factories.