aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2022-06-19 17:30:05 +0200
committerGitHub <noreply@github.com>2022-06-19 17:30:05 +0200
commit89fc2494b40624c03a74e01f2f4ec4941bb5314d (patch)
treede6a8ae616f2f06e02d3c5b0a0fce20c1b08315a /core
parenta11a8dd92fcccff770d6893f27c3546fef17655d (diff)
downloaddokka-89fc2494b40624c03a74e01f2f4ec4941bb5314d.tar.gz
dokka-89fc2494b40624c03a74e01f2f4ec4941bb5314d.tar.bz2
dokka-89fc2494b40624c03a74e01f2f4ec4941bb5314d.zip
Fix incorrectly labeling java properties as val/var (#2540)
Fixes #2539
Diffstat (limited to 'core')
-rw-r--r--core/api/core.api7
-rw-r--r--core/src/main/kotlin/model/documentableProperties.kt10
2 files changed, 17 insertions, 0 deletions
diff --git a/core/api/core.api b/core/api/core.api
index 3efc0da5..4e1ed7c1 100644
--- a/core/api/core.api
+++ b/core/api/core.api
@@ -1770,6 +1770,13 @@ public final class org/jetbrains/dokka/model/Invariance : org/jetbrains/dokka/mo
public fun toString ()Ljava/lang/String;
}
+public final class org/jetbrains/dokka/model/IsVar : org/jetbrains/dokka/model/properties/ExtraProperty, org/jetbrains/dokka/model/properties/ExtraProperty$Key {
+ public static final field INSTANCE Lorg/jetbrains/dokka/model/IsVar;
+ public fun getKey ()Lorg/jetbrains/dokka/model/properties/ExtraProperty$Key;
+ public synthetic fun mergeStrategyFor (Ljava/lang/Object;Ljava/lang/Object;)Lorg/jetbrains/dokka/model/properties/MergeStrategy;
+ public fun mergeStrategyFor (Lorg/jetbrains/dokka/model/IsVar;Lorg/jetbrains/dokka/model/IsVar;)Lorg/jetbrains/dokka/model/properties/MergeStrategy;
+}
+
public final class org/jetbrains/dokka/model/JavaClassKindTypes : java/lang/Enum, org/jetbrains/dokka/model/ClassKind {
public static final field ANNOTATION_CLASS Lorg/jetbrains/dokka/model/JavaClassKindTypes;
public static final field CLASS Lorg/jetbrains/dokka/model/JavaClassKindTypes;
diff --git a/core/src/main/kotlin/model/documentableProperties.kt b/core/src/main/kotlin/model/documentableProperties.kt
index 87f40bd6..9fe8aa1d 100644
--- a/core/src/main/kotlin/model/documentableProperties.kt
+++ b/core/src/main/kotlin/model/documentableProperties.kt
@@ -39,6 +39,16 @@ object ObviousMember : ExtraProperty<Documentable>, ExtraProperty.Key<Documentab
override val key: ExtraProperty.Key<Documentable, *> = this
}
+/**
+ * Whether this [DProperty] is `var` or `val`, should be present both in Kotlin and in Java properties
+ *
+ * In case of properties that came from `Java`, [IsVar] is added if
+ * the java field has no accessors at all (plain field) or has a setter
+ */
+object IsVar : ExtraProperty<DProperty>, ExtraProperty.Key<DProperty, IsVar> {
+ override val key: ExtraProperty.Key<DProperty, *> = this
+}
+
data class CheckedExceptions(val exceptions: SourceSetDependent<List<DRI>>) : ExtraProperty<Documentable>, ExtraProperty.Key<Documentable, ObviousMember> {
companion object : ExtraProperty.Key<Documentable, CheckedExceptions> {
override fun mergeStrategyFor(left: CheckedExceptions, right: CheckedExceptions) =