Package de.peekandpoke.ultra.kontainer

Types

DependencyLookup
Link copied to clipboard
class DependencyLookup
A lookup for mapping service class to service classes that they request for injection.
DynamicsChecker
Link copied to clipboard
data class DynamicsChecker
Helper class to validate the correctness instances passed KontainerBlueprint.useWith.
InjectionContext
Link copied to clipboard
data class InjectionContext(kontainer: Kontainer, requestingClass: KClass<out Any>, currentClass: KClass<out Any>)
The injection context as passed through to all parameter providers.
InjectionType
Link copied to clipboard
enum InjectionType : Enum<InjectionType>
Type of injection
InvalidClassProvided
Link copied to clipboard
class InvalidClassProvided(message: String) : KontainerException
InvalidServiceFactory
Link copied to clipboard
class InvalidServiceFactory(message: String) : KontainerException
Kontainer
Link copied to clipboard
class Kontainer
The container
KontainerBlueprint
Link copied to clipboard
class KontainerBlueprint
The Kontainer blueprint is built by the KontainerBuilder
KontainerBuilder
Link copied to clipboard
class KontainerBuilder
KontainerDebugInfo
Link copied to clipboard
data class KontainerDebugInfo(services: List<KontainerDebugInfo.ServiceDebugInfo>, config: Map<String, String>)
KontainerException
Link copied to clipboard
open class KontainerException(message: String) : Throwable
KontainerInconsistent
Link copied to clipboard
class KontainerInconsistent(message: String) : KontainerException
KontainerModule
Link copied to clipboard
class KontainerModule(module: KontainerBuilder.() -> Unit)
Kontainer module
KontainerTracker
Link copied to clipboard
class KontainerTracker
Keeps track of instantiated kontainers and servicesTODO: also keep track of services...
LazyServiceLookup
Link copied to clipboard
class LazyServiceLookup<T : Any>(context: InjectionContext, map: Map<KClass<out T>, (InjectionContext) -> T>) : Lookup<T>
Lazy Lookup implementation
LazyServiceLookupBlueprint
Link copied to clipboard
class LazyServiceLookupBlueprint<T : Any>(map: Map<KClass<out T>, (InjectionContext) -> T>)
The blueprint is a pre-stage of the LazyServiceLookup and can be re-used with a InjectionContext
ParameterizedKontainerModule
Link copied to clipboard
class ParameterizedKontainerModule<P>(module: KontainerBuilder.(P) -> Unit)
Parameterized Kontainer module
ParameterizedKontainerModule2
Link copied to clipboard
class ParameterizedKontainerModule2<P1, P2>(module: KontainerBuilder.(P1, P2) -> Unit)
Parameterized Kontainer module
ParameterizedKontainerModule3
Link copied to clipboard
class ParameterizedKontainerModule3<P1, P2, P3>(module: KontainerBuilder.(P1, P2, P3) -> Unit)
Parameterized Kontainer module
ParameterProvider
Link copied to clipboard
interface ParameterProvider
ParameterProviders provide parameters needed to instantiate services.
ServiceAmbiguous
Link copied to clipboard
class ServiceAmbiguous(message: String) : KontainerException
ServiceDefinition
Link copied to clipboard
class ServiceDefinition
Defines a serviceSpecifies which class the definitions produces.
ServiceNotFound
Link copied to clipboard
class ServiceNotFound(message: String) : KontainerException
ServiceProducer
Link copied to clipboard
class ServiceProducer
Produce service instanceThe signature is the list of parameters of the primary constructor of the service.
ServiceProvider
Link copied to clipboard
interface ServiceProvider
Service providers create instances of services
TypeLookup
Link copied to clipboard
abstract class TypeLookup
Helpers for looking up base and super types.

Functions

kontainer
Link copied to clipboard
fun kontainer(builder: KontainerBuilder.() -> Unit): KontainerBlueprint
Creates a kontainer blueprint
module
Link copied to clipboard
fun module(builder: KontainerBuilder.() -> Unit): KontainerModule
Creates a kontainer module
fun <P> module(builder: KontainerBuilder.(P) -> Unit): ParameterizedKontainerModule<P>
Creates a parameterized kontainer module
fun <P1, P2> module(builder: KontainerBuilder.(P1, P2) -> Unit): ParameterizedKontainerModule2<P1, P2>
Creates a parameterized kontainer module with two parameters
fun <P1, P2, P3> module(builder: KontainerBuilder.(P1, P2, P3) -> Unit): ParameterizedKontainerModule3<P1, P2, P3>
Creates a parameterized kontainer module with three parameters