getByType

abstract fun <T> getByType(type: Class<T>): T(source)
abstract fun <T> getByType(type: TypeOf<T>): T(source)

Looks for the extension of a given type (useful to avoid casting). If none found it will throw an exception.

Return

extension, never null

Parameters

type

extension type

Throws

When the given extension is not found.