diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2023-08-31 20:16:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-31 20:16:01 +0200 |
commit | 02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 (patch) | |
tree | 66f6d6f089a93b863bf1144666491eca6729ad05 /core/src/main/kotlin/model/documentableProperties.kt | |
parent | 6a181a7a2b03ec263788d137610e86937a57d434 (diff) | |
download | dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.gz dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.bz2 dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.zip |
Enable explicit API mode (#3139)
Diffstat (limited to 'core/src/main/kotlin/model/documentableProperties.kt')
-rw-r--r-- | core/src/main/kotlin/model/documentableProperties.kt | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/core/src/main/kotlin/model/documentableProperties.kt b/core/src/main/kotlin/model/documentableProperties.kt index dc6456f8..b0ebb6ef 100644 --- a/core/src/main/kotlin/model/documentableProperties.kt +++ b/core/src/main/kotlin/model/documentableProperties.kt @@ -9,37 +9,37 @@ import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.model.properties.ExtraProperty import org.jetbrains.dokka.model.properties.MergeStrategy -data class InheritedMember(val inheritedFrom: SourceSetDependent<DRI?>) : ExtraProperty<Documentable> { - companion object : ExtraProperty.Key<Documentable, InheritedMember> { - override fun mergeStrategyFor(left: InheritedMember, right: InheritedMember) = MergeStrategy.Replace( +public data class InheritedMember(val inheritedFrom: SourceSetDependent<DRI?>) : ExtraProperty<Documentable> { + public companion object : ExtraProperty.Key<Documentable, InheritedMember> { + override fun mergeStrategyFor(left: InheritedMember, right: InheritedMember): MergeStrategy<Documentable> = MergeStrategy.Replace( InheritedMember(left.inheritedFrom + right.inheritedFrom) ) } - fun isInherited(sourceSetDependent: DokkaSourceSet): Boolean = inheritedFrom[sourceSetDependent] != null + public fun isInherited(sourceSetDependent: DokkaSourceSet): Boolean = inheritedFrom[sourceSetDependent] != null override val key: ExtraProperty.Key<Documentable, *> = InheritedMember } -data class ImplementedInterfaces(val interfaces: SourceSetDependent<List<TypeConstructor>>) : ExtraProperty<Documentable> { - companion object : ExtraProperty.Key<Documentable, ImplementedInterfaces> { - override fun mergeStrategyFor(left: ImplementedInterfaces, right: ImplementedInterfaces) = +public data class ImplementedInterfaces(val interfaces: SourceSetDependent<List<TypeConstructor>>) : ExtraProperty<Documentable> { + public companion object : ExtraProperty.Key<Documentable, ImplementedInterfaces> { + override fun mergeStrategyFor(left: ImplementedInterfaces, right: ImplementedInterfaces): MergeStrategy<Documentable> = MergeStrategy.Replace(ImplementedInterfaces(left.interfaces + right.interfaces)) } override val key: ExtraProperty.Key<Documentable, *> = ImplementedInterfaces } -data class ExceptionInSupertypes(val exceptions: SourceSetDependent<List<TypeConstructor>>): ExtraProperty<Documentable> { - companion object : ExtraProperty.Key<Documentable, ExceptionInSupertypes> { - override fun mergeStrategyFor(left: ExceptionInSupertypes, right: ExceptionInSupertypes) = +public data class ExceptionInSupertypes(val exceptions: SourceSetDependent<List<TypeConstructor>>): ExtraProperty<Documentable> { + public companion object : ExtraProperty.Key<Documentable, ExceptionInSupertypes> { + override fun mergeStrategyFor(left: ExceptionInSupertypes, right: ExceptionInSupertypes): MergeStrategy<Documentable> = MergeStrategy.Replace(ExceptionInSupertypes(left.exceptions + right.exceptions)) } override val key: ExtraProperty.Key<Documentable, *> = ExceptionInSupertypes } -object ObviousMember : ExtraProperty<Documentable>, ExtraProperty.Key<Documentable, ObviousMember> { +public object ObviousMember : ExtraProperty<Documentable>, ExtraProperty.Key<Documentable, ObviousMember> { override val key: ExtraProperty.Key<Documentable, *> = this } @@ -49,12 +49,12 @@ object ObviousMember : ExtraProperty<Documentable>, ExtraProperty.Key<Documentab * 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> { +public object IsVar : ExtraProperty<DProperty>, ExtraProperty.Key<DProperty, IsVar> { override val key: ExtraProperty.Key<DProperty, *> = this } -data class IsAlsoParameter(val inSourceSets: List<DokkaSourceSet>) : ExtraProperty<DProperty> { - companion object : ExtraProperty.Key<DProperty, IsAlsoParameter> { +public data class IsAlsoParameter(val inSourceSets: List<DokkaSourceSet>) : ExtraProperty<DProperty> { + public companion object : ExtraProperty.Key<DProperty, IsAlsoParameter> { override fun mergeStrategyFor(left: IsAlsoParameter, right: IsAlsoParameter): MergeStrategy<DProperty> = MergeStrategy.Replace(IsAlsoParameter(left.inSourceSets + right.inSourceSets)) } @@ -62,9 +62,9 @@ data class IsAlsoParameter(val inSourceSets: List<DokkaSourceSet>) : ExtraProper override val key: ExtraProperty.Key<DProperty, *> = IsAlsoParameter } -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) = +public data class CheckedExceptions(val exceptions: SourceSetDependent<List<DRI>>) : ExtraProperty<Documentable>, ExtraProperty.Key<Documentable, ObviousMember> { + public companion object : ExtraProperty.Key<Documentable, CheckedExceptions> { + override fun mergeStrategyFor(left: CheckedExceptions, right: CheckedExceptions): MergeStrategy<Documentable> = MergeStrategy.Replace(CheckedExceptions(left.exceptions + right.exceptions)) } override val key: ExtraProperty.Key<Documentable, *> = CheckedExceptions |