All Downloads are FREE. Search and download functionalities are using the official Maven repository.

e.ultra.kontainer.0.76.4.source-code.LazyServiceLookupBlueprint.kt Maven / Gradle / Ivy

There is a newer version: 0.77.0
Show newest version
package de.peekandpoke.ultra.kontainer

import kotlin.reflect.KClass

/**
 * The blueprint is a pre-stage of the [LazyServiceLookup] and can be re-used with a [InjectionContext]
 */
class LazyServiceLookupBlueprint(
    private val map: Map, (Kontainer, InjectionContext) -> T>,
) {
    /**
     * Get the keys
     */
    fun getClasses(): Set> = map.keys

    /**
     * Creates a [LazyServiceLookup] for the given [context]
     */
    fun with(kontainer: Kontainer, context: InjectionContext): LazyServiceLookup {
        return LazyServiceLookup(kontainer, context, map)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy