Companion

object Companion

Functions

Link copied to clipboard
inline fun <T : Event> getKey(): Event.Key<T>
fun <T : Event> getKey(type: Class<T>): Event.Key<T>

fun <E : Event> getKey(type: KClass<E>): Event.Key<E>

尝试通过一个 EventKClass 来得到一个其对应的 Key.

Link copied to clipboard
infix fun Event.Key<*>.isSub(from: Event.Key<*>): Boolean

检测当前接收器是否为 from 的子类型。