winter-java / io.jentz.winter.java / JWinter / key

key

@JvmStatic @JvmOverloads fun <R : Any> key(type: Class<R>, qualifier: Any? = null): TypeKey<Unit, R>

Creates a TypeKey with argument type Unit and return type R from a Java class.

Parameters

type - The return type.

qualifier - The optional qualifier.

Return
The type key.

@JvmStatic @JvmOverloads fun <A, R : Any> key(argumentType: Class<A>, returnType: Class<R>, qualifier: Any? = null): TypeKey<A, R>

Creates a TypeKey with argument type A and return type R from Java classes.

Parameters

argumentType - The argument type.

returnType - The return type.

qualifier - The optional qualifier.

Return
The type key.