getTag

open fun <T : Any> getTag(name: String): T?

Retrieves the tag named name, cast to T, or null if no such tag is attached. The cast is unchecked (erased generics): if a tag named name is attached but is not actually an instance of T, this call will not fail, but a ClassCastException is likely to surface later, wherever the caller uses the returned value as a T.