aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/api/core.api47
-rw-r--r--core/src/main/kotlin/model/Documentable.kt52
2 files changed, 68 insertions, 31 deletions
diff --git a/core/api/core.api b/core/api/core.api
index 063f56c5..74b4b422 100644
--- a/core/api/core.api
+++ b/core/api/core.api
@@ -784,7 +784,7 @@ public final class org/jetbrains/dokka/model/BooleanValue : org/jetbrains/dokka/
public fun toString ()Ljava/lang/String;
}
-public abstract class org/jetbrains/dokka/model/Bound : org/jetbrains/dokka/model/Projection, org/jetbrains/dokka/model/AnnotationTarget {
+public abstract class org/jetbrains/dokka/model/Bound : org/jetbrains/dokka/model/Projection {
}
public abstract interface class org/jetbrains/dokka/model/Callable : org/jetbrains/dokka/model/WithAbstraction, org/jetbrains/dokka/model/WithIsExpectActual, org/jetbrains/dokka/model/WithSources, org/jetbrains/dokka/model/WithType, org/jetbrains/dokka/model/WithVisibility {
@@ -1802,7 +1802,7 @@ public final class org/jetbrains/dokka/model/JavaModifier$Final : org/jetbrains/
public static final field INSTANCE Lorg/jetbrains/dokka/model/JavaModifier$Final;
}
-public final class org/jetbrains/dokka/model/JavaObject : org/jetbrains/dokka/model/Bound, org/jetbrains/dokka/model/properties/WithExtraProperties {
+public final class org/jetbrains/dokka/model/JavaObject : org/jetbrains/dokka/model/Bound, org/jetbrains/dokka/model/AnnotationTarget, org/jetbrains/dokka/model/properties/WithExtraProperties {
public fun <init> ()V
public fun <init> (Lorg/jetbrains/dokka/model/properties/PropertyContainer;)V
public synthetic fun <init> (Lorg/jetbrains/dokka/model/properties/PropertyContainer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
@@ -1949,15 +1949,20 @@ public final class org/jetbrains/dokka/model/PrimaryConstructorExtra : org/jetbr
public fun mergeStrategyFor (Lorg/jetbrains/dokka/model/PrimaryConstructorExtra;Lorg/jetbrains/dokka/model/PrimaryConstructorExtra;)Lorg/jetbrains/dokka/model/properties/MergeStrategy;
}
-public final class org/jetbrains/dokka/model/PrimitiveJavaType : org/jetbrains/dokka/model/Bound {
- public fun <init> (Ljava/lang/String;)V
+public final class org/jetbrains/dokka/model/PrimitiveJavaType : org/jetbrains/dokka/model/Bound, org/jetbrains/dokka/model/AnnotationTarget, org/jetbrains/dokka/model/properties/WithExtraProperties {
+ public fun <init> (Ljava/lang/String;Lorg/jetbrains/dokka/model/properties/PropertyContainer;)V
+ public synthetic fun <init> (Ljava/lang/String;Lorg/jetbrains/dokka/model/properties/PropertyContainer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
- public final fun copy (Ljava/lang/String;)Lorg/jetbrains/dokka/model/PrimitiveJavaType;
- public static synthetic fun copy$default (Lorg/jetbrains/dokka/model/PrimitiveJavaType;Ljava/lang/String;ILjava/lang/Object;)Lorg/jetbrains/dokka/model/PrimitiveJavaType;
+ public final fun component2 ()Lorg/jetbrains/dokka/model/properties/PropertyContainer;
+ public final fun copy (Ljava/lang/String;Lorg/jetbrains/dokka/model/properties/PropertyContainer;)Lorg/jetbrains/dokka/model/PrimitiveJavaType;
+ public static synthetic fun copy$default (Lorg/jetbrains/dokka/model/PrimitiveJavaType;Ljava/lang/String;Lorg/jetbrains/dokka/model/properties/PropertyContainer;ILjava/lang/Object;)Lorg/jetbrains/dokka/model/PrimitiveJavaType;
public fun equals (Ljava/lang/Object;)Z
+ public fun getExtra ()Lorg/jetbrains/dokka/model/properties/PropertyContainer;
public final fun getName ()Ljava/lang/String;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
+ public synthetic fun withNewExtras (Lorg/jetbrains/dokka/model/properties/PropertyContainer;)Ljava/lang/Object;
+ public fun withNewExtras (Lorg/jetbrains/dokka/model/properties/PropertyContainer;)Lorg/jetbrains/dokka/model/PrimitiveJavaType;
}
public abstract class org/jetbrains/dokka/model/Projection {
@@ -1990,20 +1995,25 @@ public final class org/jetbrains/dokka/model/StringValue : org/jetbrains/dokka/m
public fun toString ()Ljava/lang/String;
}
-public final class org/jetbrains/dokka/model/TypeAliased : org/jetbrains/dokka/model/Bound {
- public fun <init> (Lorg/jetbrains/dokka/model/Bound;Lorg/jetbrains/dokka/model/Bound;)V
+public final class org/jetbrains/dokka/model/TypeAliased : org/jetbrains/dokka/model/Bound, org/jetbrains/dokka/model/AnnotationTarget, org/jetbrains/dokka/model/properties/WithExtraProperties {
+ public fun <init> (Lorg/jetbrains/dokka/model/Bound;Lorg/jetbrains/dokka/model/Bound;Lorg/jetbrains/dokka/model/properties/PropertyContainer;)V
+ public synthetic fun <init> (Lorg/jetbrains/dokka/model/Bound;Lorg/jetbrains/dokka/model/Bound;Lorg/jetbrains/dokka/model/properties/PropertyContainer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Lorg/jetbrains/dokka/model/Bound;
public final fun component2 ()Lorg/jetbrains/dokka/model/Bound;
- public final fun copy (Lorg/jetbrains/dokka/model/Bound;Lorg/jetbrains/dokka/model/Bound;)Lorg/jetbrains/dokka/model/TypeAliased;
- public static synthetic fun copy$default (Lorg/jetbrains/dokka/model/TypeAliased;Lorg/jetbrains/dokka/model/Bound;Lorg/jetbrains/dokka/model/Bound;ILjava/lang/Object;)Lorg/jetbrains/dokka/model/TypeAliased;
+ public final fun component3 ()Lorg/jetbrains/dokka/model/properties/PropertyContainer;
+ public final fun copy (Lorg/jetbrains/dokka/model/Bound;Lorg/jetbrains/dokka/model/Bound;Lorg/jetbrains/dokka/model/properties/PropertyContainer;)Lorg/jetbrains/dokka/model/TypeAliased;
+ public static synthetic fun copy$default (Lorg/jetbrains/dokka/model/TypeAliased;Lorg/jetbrains/dokka/model/Bound;Lorg/jetbrains/dokka/model/Bound;Lorg/jetbrains/dokka/model/properties/PropertyContainer;ILjava/lang/Object;)Lorg/jetbrains/dokka/model/TypeAliased;
public fun equals (Ljava/lang/Object;)Z
+ public fun getExtra ()Lorg/jetbrains/dokka/model/properties/PropertyContainer;
public final fun getInner ()Lorg/jetbrains/dokka/model/Bound;
public final fun getTypeAlias ()Lorg/jetbrains/dokka/model/Bound;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
+ public synthetic fun withNewExtras (Lorg/jetbrains/dokka/model/properties/PropertyContainer;)Ljava/lang/Object;
+ public fun withNewExtras (Lorg/jetbrains/dokka/model/properties/PropertyContainer;)Lorg/jetbrains/dokka/model/TypeAliased;
}
-public abstract class org/jetbrains/dokka/model/TypeConstructor : org/jetbrains/dokka/model/Bound {
+public abstract class org/jetbrains/dokka/model/TypeConstructor : org/jetbrains/dokka/model/Bound, org/jetbrains/dokka/model/AnnotationTarget {
public abstract fun getDri ()Lorg/jetbrains/dokka/links/DRI;
public abstract fun getPresentableName ()Ljava/lang/String;
public abstract fun getProjections ()Ljava/util/List;
@@ -2022,7 +2032,7 @@ public final class org/jetbrains/dokka/model/TypeConstructorWithKind {
public fun toString ()Ljava/lang/String;
}
-public final class org/jetbrains/dokka/model/TypeParameter : org/jetbrains/dokka/model/Bound, org/jetbrains/dokka/model/properties/WithExtraProperties {
+public final class org/jetbrains/dokka/model/TypeParameter : org/jetbrains/dokka/model/Bound, org/jetbrains/dokka/model/AnnotationTarget, org/jetbrains/dokka/model/properties/WithExtraProperties {
public fun <init> (Lorg/jetbrains/dokka/links/DRI;Ljava/lang/String;Ljava/lang/String;Lorg/jetbrains/dokka/model/properties/PropertyContainer;)V
public synthetic fun <init> (Lorg/jetbrains/dokka/links/DRI;Ljava/lang/String;Ljava/lang/String;Lorg/jetbrains/dokka/model/properties/PropertyContainer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Lorg/jetbrains/dokka/links/DRI;
@@ -2042,15 +2052,20 @@ public final class org/jetbrains/dokka/model/TypeParameter : org/jetbrains/dokka
public fun withNewExtras (Lorg/jetbrains/dokka/model/properties/PropertyContainer;)Lorg/jetbrains/dokka/model/TypeParameter;
}
-public final class org/jetbrains/dokka/model/UnresolvedBound : org/jetbrains/dokka/model/Bound {
- public fun <init> (Ljava/lang/String;)V
+public final class org/jetbrains/dokka/model/UnresolvedBound : org/jetbrains/dokka/model/Bound, org/jetbrains/dokka/model/AnnotationTarget, org/jetbrains/dokka/model/properties/WithExtraProperties {
+ public fun <init> (Ljava/lang/String;Lorg/jetbrains/dokka/model/properties/PropertyContainer;)V
+ public synthetic fun <init> (Ljava/lang/String;Lorg/jetbrains/dokka/model/properties/PropertyContainer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
- public final fun copy (Ljava/lang/String;)Lorg/jetbrains/dokka/model/UnresolvedBound;
- public static synthetic fun copy$default (Lorg/jetbrains/dokka/model/UnresolvedBound;Ljava/lang/String;ILjava/lang/Object;)Lorg/jetbrains/dokka/model/UnresolvedBound;
+ public final fun component2 ()Lorg/jetbrains/dokka/model/properties/PropertyContainer;
+ public final fun copy (Ljava/lang/String;Lorg/jetbrains/dokka/model/properties/PropertyContainer;)Lorg/jetbrains/dokka/model/UnresolvedBound;
+ public static synthetic fun copy$default (Lorg/jetbrains/dokka/model/UnresolvedBound;Ljava/lang/String;Lorg/jetbrains/dokka/model/properties/PropertyContainer;ILjava/lang/Object;)Lorg/jetbrains/dokka/model/UnresolvedBound;
public fun equals (Ljava/lang/Object;)Z
+ public fun getExtra ()Lorg/jetbrains/dokka/model/properties/PropertyContainer;
public final fun getName ()Ljava/lang/String;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
+ public synthetic fun withNewExtras (Lorg/jetbrains/dokka/model/properties/PropertyContainer;)Ljava/lang/Object;
+ public fun withNewExtras (Lorg/jetbrains/dokka/model/properties/PropertyContainer;)Lorg/jetbrains/dokka/model/UnresolvedBound;
}
public abstract class org/jetbrains/dokka/model/Variance : org/jetbrains/dokka/model/Projection {
diff --git a/core/src/main/kotlin/model/Documentable.kt b/core/src/main/kotlin/model/Documentable.kt
index 13d04555..0f73c8e1 100644
--- a/core/src/main/kotlin/model/Documentable.kt
+++ b/core/src/main/kotlin/model/Documentable.kt
@@ -385,20 +385,18 @@ data class DTypeAlias(
}
sealed class Projection
-sealed class Bound : Projection(), AnnotationTarget
+sealed class Bound : Projection()
data class TypeParameter(
val dri: DRI,
val name: String,
val presentableName: String? = null,
override val extra: PropertyContainer<TypeParameter> = PropertyContainer.empty()
-) : Bound(), WithExtraProperties<TypeParameter> {
+) : Bound(), AnnotationTarget, WithExtraProperties<TypeParameter> {
override fun withNewExtras(newExtras: PropertyContainer<TypeParameter>): TypeParameter =
copy(extra = extra)
}
-object Star : Projection()
-
-sealed class TypeConstructor : Bound() {
+sealed class TypeConstructor : Bound(), AnnotationTarget {
abstract val dri: DRI
abstract val projections: List<Projection>
abstract val presentableName: String?
@@ -426,6 +424,39 @@ data class FunctionalTypeConstructor(
copy(extra = newExtras)
}
+// kotlin.annotation.AnnotationTarget.TYPEALIAS
+data class TypeAliased(
+ val typeAlias: Bound,
+ val inner: Bound,
+ override val extra: PropertyContainer<TypeAliased> = PropertyContainer.empty()
+) : Bound(), AnnotationTarget, WithExtraProperties<TypeAliased> {
+ override fun withNewExtras(newExtras: PropertyContainer<TypeAliased>): TypeAliased =
+ copy(extra = newExtras)
+}
+
+data class PrimitiveJavaType(
+ val name: String,
+ override val extra: PropertyContainer<PrimitiveJavaType> = PropertyContainer.empty()
+) : Bound(), AnnotationTarget, WithExtraProperties<PrimitiveJavaType> {
+ override fun withNewExtras(newExtras: PropertyContainer<PrimitiveJavaType>): PrimitiveJavaType =
+ copy(extra = newExtras)
+}
+
+data class JavaObject(override val extra: PropertyContainer<JavaObject> = PropertyContainer.empty()) :
+ Bound(), AnnotationTarget, WithExtraProperties<JavaObject> {
+ override fun withNewExtras(newExtras: PropertyContainer<JavaObject>): JavaObject =
+ copy(extra = newExtras)
+}
+
+data class UnresolvedBound(
+ val name: String,
+ override val extra: PropertyContainer<UnresolvedBound> = PropertyContainer.empty()
+) : Bound(), AnnotationTarget, WithExtraProperties<UnresolvedBound> {
+ override fun withNewExtras(newExtras: PropertyContainer<UnresolvedBound>): UnresolvedBound =
+ copy(extra = newExtras)
+}
+
+// The following Projections are not AnnotationTargets; they cannot be annotated.
data class Nullable(val inner: Bound) : Bound()
sealed class Variance<out T : Bound> : Projection() {
@@ -444,19 +475,10 @@ data class Invariance<out T : Bound>(override val inner: T) : Variance<T>() {
override fun toString() = ""
}
-data class TypeAliased(val typeAlias: Bound, val inner: Bound) : Bound()
-data class PrimitiveJavaType(val name: String) : Bound()
+object Star : Projection()
object Void : Bound()
-
-data class JavaObject(override val extra: PropertyContainer<JavaObject> = PropertyContainer.empty()) : Bound(),
- WithExtraProperties<JavaObject> {
- override fun withNewExtras(newExtras: PropertyContainer<JavaObject>): JavaObject =
- copy(extra = newExtras)
-}
-
object Dynamic : Bound()
-data class UnresolvedBound(val name: String) : Bound()
fun Variance<TypeParameter>.withDri(dri: DRI) = when (this) {
is Contravariance -> Contravariance(TypeParameter(dri, inner.name, inner.presentableName))