ServiceProvider

interface ServiceProvider

Service providers create instances of services

Inheritors

Types

Link copied to clipboard
data class CreatedInstance(val instance: Any, val createdAt: Instant)

Tracks created service instances

Link copied to clipboard

Provides an already existing object as a service

Link copied to clipboard

Provides a prototype service

Link copied to clipboard

Provides a global singleton service

Link copied to clipboard
interface Provider

Provides a ServiceProvider

Link copied to clipboard

Ways in which services are provided.

Functions

Link copied to clipboard
abstract fun provide(kontainer: Kontainer, context: InjectionContext): Any

Provides the service instance

Link copied to clipboard
abstract fun validate(kontainer: Kontainer): List<String>

Validates that a service can be provided.

Properties

Link copied to clipboard

The definition of the service.

Link copied to clipboard

A list of all instances created by the provider.

Link copied to clipboard

The type of the service that is created.