Optimistically add isInstance and qualifiedName to common KClass

Because they are used in common cast and safeCast functions
This commit is contained in:
Ilya Gorbunov
2019-12-17 19:01:18 +03:00
parent 47f78c424d
commit ea95aabbb0
2 changed files with 15 additions and 2 deletions
@@ -19,4 +19,17 @@ public expect interface KClass<T : Any> {
* or `null` if the class has no name (if, for example, it is an anonymous object literal).
*/
public val simpleName: String?
/**
* The fully qualified dot-separated name of the class,
* or `null` if the class is local or it is an anonymous object literal.
*/
public val qualifiedName: String?
/**
* Returns `true` if [value] is an instance of this class on a given platform.
*/
@SinceKotlin("1.1")
public fun isInstance(value: Any?): Boolean
}