getAttribute

abstract fun <T : Any> getAttribute(attribute: Attribute<T>): T?

通过 attribute 尝试获取指定属性。