AbstractMessageKey

abstract class AbstractMessageKey<out M : SingleMessage>(val safeCast: (SingleMessage) -> M?) : MessageKey<M>

独立的 MessageKey 的实现. '独立' 即 final, 不支持多态类型. 适用于作为最顶层的 MessageKey, 如 MessageSource.

See also

Constructors

Link copied to clipboard
fun <out M : SingleMessage> AbstractMessageKey(safeCast: (SingleMessage) -> M?)

Properties

Link copied to clipboard
open override val safeCast: (SingleMessage) -> M?

将一个 SingleMessage 强转为 M 类型. 在类型不符合时返回 null

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard