aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/model/defaultValues.kt
blob: d9caecd9db1a41168c22790a38f02a43da1ac0f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package org.jetbrains.dokka.model

import org.jetbrains.dokka.model.properties.ExtraProperty
import org.jetbrains.dokka.model.properties.MergeStrategy

class DefaultValue(val value: Expression): ExtraProperty<Documentable> {
    companion object : ExtraProperty.Key<Documentable, DefaultValue> {
        override fun mergeStrategyFor(left: DefaultValue, right: DefaultValue): MergeStrategy<Documentable> = MergeStrategy.Remove // TODO pass a logger somehow and log this
    }

    override val key: ExtraProperty.Key<Documentable, *>
        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