package org.jetbrains.dokka.model 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) : ExtraProperty { companion object : ExtraProperty.Key { override fun mergeStrategyFor( left: AdditionalModifiers, right: AdditionalModifiers ): MergeStrategy = MergeStrategy.Replace(AdditionalModifiers(left.content + right.content)) } override fun equals(other: Any?): Boolean = if (other is AdditionalModifiers) other.content == content else false override fun hashCode() = content.hashCode() override val key: ExtraProperty.Key = AdditionalModifiers } class Annotations(val content: List) : ExtraProperty { companion object : ExtraProperty.Key { override fun mergeStrategyFor(left: Annotations, right: Annotations): MergeStrategy = MergeStrategy.Replace(Annotations((left.content + right.content).distinct())) } override val key: ExtraProperty.Key = Annotations data class Annotation(val dri: DRI, val params: Map) { override fun equals(other: Any?): Boolean = when (other) { is Annotation -> dri == other.dri else -> false } override fun hashCode(): Int = dri.hashCode() } } object PrimaryConstructorExtra : ExtraProperty, ExtraProperty.Key { override val key: ExtraProperty.Key = this } data class ActualTypealias(val underlyingType: SourceSetDependent) : ExtraProperty { companion object : ExtraProperty.Key { override fun mergeStrategyFor( left: ActualTypealias, right: ActualTypealias ) = MergeStrategy.Replace(ActualTypealias(left.underlyingType + right.underlyingType)) } override val key: ExtraProperty.Key = ActualTypealias }