Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard

One of the conditions required for a ConditionalService to be instantiated.

Link copied to clipboard

Defines custom conditions used while checking service instantiability.

Link copied to clipboard
fun interface InstanceSupplier<T : Any>

Supplies an instance of the registered type.

Link copied to clipboard
interface LazyService<out T : Any> : Lazy<T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class ServiceResult<out T : Any>
Link copied to clipboard
class ServiceSupplier<T : Any> @JvmOverloads constructor(val primaryType: KClass<T>, val name: String = defaultName(primaryType), val additionalTypes: Set<KClass<in T>> = emptySet(), val isPrimary: Boolean = false, val isLazy: Boolean = false, val priority: Int = 0, val annotations: List<Annotation> = emptyList(), val supplier: (BContext) -> T)

Represents the attributes and initializer of a given service type.

Functions

Link copied to clipboard
Link copied to clipboard

Filters out interfaced services of that type if they are already being inspected.

Link copied to clipboard

Filters out interfaced services of that type if they are already being inspected.

Link copied to clipboard
inline fun <T : Any> BContext.getService(): T
inline fun <T : Any> ServiceContainer.getService(): T
fun <T : Any> BContext.getService(kClass: KClass<T>): T
Link copied to clipboard
inline fun <T : Any> BContext.getServiceOrNull(): T?
fun <T : Any> BContext.getServiceOrNull(kClass: KClass<T>): T?
Link copied to clipboard
inline operator fun <T : Any> ServiceContainer.getValue(thisRef: Any?, prop: KProperty<*>): T
Link copied to clipboard
inline fun <R : Any> ServiceContainer.lazy(): LazyService<R>
inline fun <R : Any> ServiceContainer.lazy(name: String): LazyService<R>
fun <R : Any> ServiceContainer.lazy(name: String, requiredType: KClass<R>): LazyService<R>
Link copied to clipboard
inline fun <R : Any, U : R> ServiceContainer.lazyOrElse(crossinline block: () -> U): Lazy<R>
inline fun <R : Any, U : R> ServiceContainer.lazyOrElse(name: String, crossinline block: () -> U): Lazy<R>
fun <R : Any, U : R> ServiceContainer.lazyOrElse(clazz: KClass<R>, block: () -> U): Lazy<R>
fun <R : Any, U : R> ServiceContainer.lazyOrElse(name: String, requiredType: KClass<R>, block: () -> U): Lazy<R>
Link copied to clipboard
inline fun <R : Any> ServiceContainer.lazyOrNull(): Lazy<R?>
inline fun <R : Any> ServiceContainer.lazyOrNull(name: String): Lazy<R?>
fun <R : Any> ServiceContainer.lazyOrNull(name: String, requiredType: KClass<R>): Lazy<R?>
Link copied to clipboard
inline fun <T : Any> ServiceContainer.putServiceAs(t: T)
inline fun <T : Any> ServiceContainer.putServiceAs(t: T, name: String)
inline fun <T : Any> DefaultServiceContainer.putServiceAs(t: T, name: String? = null, isPrimary: Boolean = false, priority: Int = 0, typeAliases: Set<KClass<*>> = emptySet(), annotations: Collection<Annotation> = emptySet())
Link copied to clipboard
inline fun <A : Any> DefaultServiceContainer.putServiceWithTypeAlias(t: Any, name: String? = null, isPrimary: Boolean = false, priority: Int = 0, annotations: Collection<Annotation> = emptySet())
Link copied to clipboard