ForSuperTypes

data class ForSuperTypes(superTypes: Set<KClass<*>>) : TypeLookup

Helper class for finding superTypes of given base type

Result to calls of getAllCandidatesFor and cached internally for future reuse.

Constructors

ForSuperTypes
Link copied to clipboard
fun ForSuperTypes(superTypes: Set<KClass<*>>)

Functions

getAllCandidatesFor
Link copied to clipboard
open override fun getAllCandidatesFor(type: KClass<*>): Set<KClass<*>>
Gets all superTypes for the given base type
getDistinctFor
Link copied to clipboard
fun getDistinctFor(type: KClass<*>): KClass<*>
Gets a distinct candidate for the given typeIf there is no super type or more than one found, a ServiceNotFound is thrown.
getDistinctForOrNull
Link copied to clipboard
fun <T : Any> getDistinctForOrNull(type: KClass<T>): KClass<T>?
Get a distinct super type of the given type or null if there is none or multiple candidates
getLookupBlueprint
Link copied to clipboard
fun getLookupBlueprint(type: KClass<*>): LazyServiceLookupBlueprint<*>
Get all superTypes for the given base type as a LazyServiceLookupBlueprint

Properties

superTypes
Link copied to clipboard
val superTypes: Set<KClass<*>>