state

fun state(key: String): Any?

读取已恢复的宿主状态;key 不存在时返回 null


fun <T> state(key: String, type: Class<T>): T?

type 读取已恢复的宿主状态;类型不匹配时返回 null