Add KClass.isValue to kotlin-reflect
#KT-44782 Fixed
This commit is contained in:
@@ -81,6 +81,10 @@ public class ClassReference(override val jClass: Class<*>) : KClass<Any>, ClassB
|
||||
override val isFun: Boolean
|
||||
get() = error()
|
||||
|
||||
@SinceKotlin("1.5")
|
||||
override val isValue: Boolean
|
||||
get() = error()
|
||||
|
||||
private fun error(): Nothing = throw KotlinReflectionNotSupportedError()
|
||||
|
||||
override fun equals(other: Any?) =
|
||||
|
||||
@@ -133,6 +133,12 @@ public actual interface KClass<T : Any> : KDeclarationContainer, KAnnotatedEleme
|
||||
@SinceKotlin("1.4")
|
||||
public val isFun: Boolean
|
||||
|
||||
/**
|
||||
* `true` if this class is a value class.
|
||||
*/
|
||||
@SinceKotlin("1.5")
|
||||
public val isValue: Boolean
|
||||
|
||||
/**
|
||||
* Returns `true` if this [KClass] instance represents the same Kotlin class as the class represented by [other].
|
||||
* On JVM this means that all of the following conditions are satisfied:
|
||||
|
||||
+2
@@ -3521,6 +3521,7 @@ public final class kotlin/jvm/internal/ClassReference : kotlin/jvm/internal/Clas
|
||||
public fun isInstance (Ljava/lang/Object;)Z
|
||||
public fun isOpen ()Z
|
||||
public fun isSealed ()Z
|
||||
public fun isValue ()Z
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
@@ -4663,6 +4664,7 @@ public abstract interface class kotlin/reflect/KClass : kotlin/reflect/KAnnotate
|
||||
public abstract fun isInstance (Ljava/lang/Object;)Z
|
||||
public abstract fun isOpen ()Z
|
||||
public abstract fun isSealed ()Z
|
||||
public abstract fun isValue ()Z
|
||||
}
|
||||
|
||||
public final class kotlin/reflect/KClasses {
|
||||
|
||||
Reference in New Issue
Block a user