aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/model/aditionalExtras.kt6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/src/main/kotlin/model/aditionalExtras.kt b/core/src/main/kotlin/model/aditionalExtras.kt
index fcf1efa6..b4355d4b 100644
--- a/core/src/main/kotlin/model/aditionalExtras.kt
+++ b/core/src/main/kotlin/model/aditionalExtras.kt
@@ -4,7 +4,7 @@ import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.model.properties.ExtraProperty
import org.jetbrains.dokka.model.properties.MergeStrategy
-class AdditionalModifiers(val content: Set<ExtraModifiers>) : ExtraProperty<Documentable> {
+class AdditionalModifiers(val content: SourceSetDependent<Set<ExtraModifiers>>) : ExtraProperty<Documentable> {
companion object : ExtraProperty.Key<Documentable, AdditionalModifiers> {
override fun mergeStrategyFor(
left: AdditionalModifiers,
@@ -19,6 +19,8 @@ class AdditionalModifiers(val content: Set<ExtraModifiers>) : ExtraProperty<Docu
override val key: ExtraProperty.Key<Documentable, *> = AdditionalModifiers
}
+fun SourceSetDependent<Set<ExtraModifiers>>.toAdditionalModifiers() = AdditionalModifiers(this)
+
class Annotations(val content: SourceSetDependent<List<Annotation>>) : ExtraProperty<Documentable> {
companion object : ExtraProperty.Key<Documentable, Annotations> {
override fun mergeStrategyFor(left: Annotations, right: Annotations): MergeStrategy<Documentable> =
@@ -37,6 +39,8 @@ class Annotations(val content: SourceSetDependent<List<Annotation>>) : ExtraProp
}
}
+fun SourceSetDependent<List<Annotations.Annotation>>.toAnnotations() = Annotations(this)
+
sealed class AnnotationParameterValue
data class AnnotationValue(val annotation: Annotations.Annotation) : AnnotationParameterValue()
data class ArrayValue(val value: List<AnnotationParameterValue>) : AnnotationParameterValue()