Optimistically add isInstance and qualifiedName to common KClass
Because they are used in common cast and safeCast functions
This commit is contained in:
@@ -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
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user