All Downloads are FREE. Search and download functionalities are using the official Maven repository.

model.defaultValues.kt Maven / Gradle / Ivy

Go to download

Dokka is an API documentation engine for Kotlin and Java, performing the same function as Javadoc for Java

There is a newer version: 2.0.0
Show newest version
package org.jetbrains.dokka.model

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

class DefaultValue(val expression: SourceSetDependent): ExtraProperty {

    @Deprecated("Use `expression` property that depends on source set", ReplaceWith("this.expression.values.first()"))
    val value: Expression
        get() = expression.values.first()
    companion object : ExtraProperty.Key {
        override fun mergeStrategyFor(left: DefaultValue, right: DefaultValue): MergeStrategy =
            MergeStrategy.Replace(DefaultValue(left.expression + right.expression))

    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy