typeOf

open fun <T> typeOf(type: Class<T>): TypeOf<T>(source)

Creates an instance of TypeOf for the given Class.

Return

the TypeOf that captures the generic type of the given Class

Parameters

type

the Class

<T>

the parameterized type of the given Class


open fun <T> typeOf(type: Type): TypeOf<T>(source)

Creates an instance of TypeOf for the given Type.

Return

the TypeOf that captures the generic type of the given Type

Parameters

type

the Type

<T>

the parameterized type of the given Type