Kapsule

class Kapsule<M>

Kapsule injector.

Parameters

Module type that it injects.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun inject(module: M)

Initializes property delegates with provided functions.

Link copied to clipboard
operator fun <T> invoke(initializer: M.() -> T): Delegate.Required<M, T>

Shortcut for required by invoking the class like a function.

Link copied to clipboard
fun <T> optional(initializer: M.() -> T?): Delegate.Optional<M, T>

Creates and registers delegate for an optional (nullable) injectable property.

Link copied to clipboard
fun <T> required(initializer: M.() -> T): Delegate.Required<M, T>

Creates and registers delegate for a required (non-null) injectable property.