From dee70abf705eb4ce35af4c6141c8aa1e724fb54c Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Thu, 22 Dec 2016 17:59:02 +0300 Subject: [PATCH] Update kdoc for KClass and KClassifier --- core/builtins/src/kotlin/reflect/KClass.kt | 7 +++++-- core/builtins/src/kotlin/reflect/KClassifier.kt | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core/builtins/src/kotlin/reflect/KClass.kt b/core/builtins/src/kotlin/reflect/KClass.kt index 7310893f25c..5003d67a445 100644 --- a/core/builtins/src/kotlin/reflect/KClass.kt +++ b/core/builtins/src/kotlin/reflect/KClass.kt @@ -133,12 +133,15 @@ public interface KClass : KDeclarationContainer, KAnnotatedElement, KCl public val isCompanion: Boolean /** - * Returns `true` if [other] is a [KClass] instance representing the same class on a given platform. + * 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: * - * 1. [other] has the same fully qualified name as this instance. + * 1. [other] has the same (fully qualified) Kotlin class name as this instance. * 2. [other]'s backing [Class] object is loaded with the same class loader as the [Class] object of this instance. * 3. If the classes represent [Array], then [Class] objects of their element types are equal. + * + * For example, on JVM, [KClass] instances for a primitive type (`int`) and the corresponding wrapper type (`java.lang.Integer`) + * are considered equal, because they have the same fully qualified name "kotlin.Int". */ override fun equals(other: Any?): Boolean diff --git a/core/builtins/src/kotlin/reflect/KClassifier.kt b/core/builtins/src/kotlin/reflect/KClassifier.kt index 6d92f4c63b2..3c804e9cfa6 100644 --- a/core/builtins/src/kotlin/reflect/KClassifier.kt +++ b/core/builtins/src/kotlin/reflect/KClassifier.kt @@ -17,8 +17,10 @@ package kotlin.reflect /** - * A classifier is either a class, or a type parameter, or a type alias. + * A classifier is either a class or a type parameter. + * + * @see [KClass] + * @see [KTypeParameter] */ -// TODO: improve doc @SinceKotlin("1.1") public interface KClassifier