sourceOr

fun <T : Any> sourceOr(type: KClass<T>, qualifier: String? = null): T?(source)

Retrieves an instance of the registered object Returns null if the object isn't found

Return

The registered object

Parameters

type

The KClass of the object

qualifier

an optional qualifier for the type

Type Parameters

T

the type of the registered object


fun <T : Any> sourceOr(key: CanvasKey<T>): T?(source)

Retrieves an instance of the registered object under the CanvasKey Returns null if the object isn't found

Return

The registered object

Parameters

key

the key the object is registered under

Type Parameters

T

the type of the registered object