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/defaultValues.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/defaultValues.kt')
-rw-r--r-- | core/src/main/kotlin/model/defaultValues.kt | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/core/src/main/kotlin/model/defaultValues.kt b/core/src/main/kotlin/model/defaultValues.kt index 6d4b2ac0..426954fb 100644 --- a/core/src/main/kotlin/model/defaultValues.kt +++ b/core/src/main/kotlin/model/defaultValues.kt @@ -7,12 +7,15 @@ package org.jetbrains.dokka.model import org.jetbrains.dokka.model.properties.ExtraProperty import org.jetbrains.dokka.model.properties.MergeStrategy -class DefaultValue(val expression: SourceSetDependent<Expression>): ExtraProperty<Documentable> { +public class DefaultValue( + public val expression: SourceSetDependent<Expression> +): ExtraProperty<Documentable> { @Deprecated("Use `expression` property that depends on source set", ReplaceWith("this.expression.values.first()")) - val value: Expression + public val value: Expression get() = expression.values.first() - companion object : ExtraProperty.Key<Documentable, DefaultValue> { + + public companion object : ExtraProperty.Key<Documentable, DefaultValue> { override fun mergeStrategyFor(left: DefaultValue, right: DefaultValue): MergeStrategy<Documentable> = MergeStrategy.Replace(DefaultValue(left.expression + right.expression)) @@ -22,10 +25,10 @@ class DefaultValue(val expression: SourceSetDependent<Expression>): ExtraPropert get() = Companion } -interface Expression -data class ComplexExpression(val value: String) : Expression -data class IntegerConstant(val value: Long) : Expression -data class StringConstant(val value: String) : Expression -data class DoubleConstant(val value: Double) : Expression -data class FloatConstant(val value: Float) : Expression -data class BooleanConstant(val value: Boolean) : Expression +public interface Expression +public data class ComplexExpression(val value: String) : Expression +public data class IntegerConstant(val value: Long) : Expression +public data class StringConstant(val value: String) : Expression +public data class DoubleConstant(val value: Double) : Expression +public data class FloatConstant(val value: Float) : Expression +public data class BooleanConstant(val value: Boolean) : Expression |