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

commonMain.org.kodein.di.erasedComp.kt Maven / Gradle / Ivy

There is a newer version: 7.22.0
Show newest version
@file:Suppress("UNCHECKED_CAST")

package org.kodein.di

import org.kodein.type.TypeToken
import org.kodein.type.erasedComp
import org.kodein.type.generic

/**
 * Creates a [CompositeTypeToken] that defines a `Set`.
 *
 * @param T The parameter type of the Set.
 */
public inline fun  erasedSet(): TypeToken> = erasedComp(Set::class, generic()) as TypeToken>

/**
 * Creates a [CompositeTypeToken] that defines a `List`.
 *
 * @param T The parameter type of the List.
 */
public inline fun  erasedList(): TypeToken> = erasedComp(List::class, generic()) as TypeToken>

/**
 * Creates a [CompositeTypeToken] that defines a `Map`.
 *
 * @param K The key parameter type of the Map.
 * @param V The value parameter type of the Map.
 */
public inline fun  erasedMap(): TypeToken> = erasedComp(Map::class, generic(), generic()) as TypeToken>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy