asPropertyOrNull

open fun <C : Capability<T>> asPropertyOrNull(superType: Class<in C>): C?
open fun <C : Capability<T>> asPropertyOrNull(superType: KClass<in C>): C?

returns a Capability of the provided superType.

Return

a capability of the provided type C

Parameters

superType

the type of capability to retrieve

Type Parameters

C

type of capability