api / org.gradle.api.reflect / TypeOf / typeOf

typeOf

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

Creates an instance of TypeOf for the given Class.

Parameters

type - the Class

- the parameterized type of the given Class

Return
the TypeOf that captures the generic type of the given Class

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

Creates an instance of TypeOf for the given Type.

Parameters

type - the Type

- the parameterized type of the given Type

Return
the TypeOf that captures the generic type of the given Type