model.properties.properties.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dokka-core Show documentation
Show all versions of dokka-core Show documentation
Dokka is an API documentation engine for Kotlin and Java, performing the same function as Javadoc for Java
package org.jetbrains.dokka.model.properties
interface ExtraProperty {
interface Key {
fun mergeStrategyFor(left: T, right: T): MergeStrategy = MergeStrategy.Fail {
throw NotImplementedError("Property merging for $this is not implemented")
}
}
val key: Key
}
interface CalculatedProperty : ExtraProperty.Key {
fun calculate(subject: C): T
}
sealed class MergeStrategy {
class Replace(val newProperty: ExtraProperty) : MergeStrategy()
object Remove : MergeStrategy()
class Full(val merger: (preMerged: C, left: C, right: C) -> C) : MergeStrategy()
class Fail(val error: () -> Nothing) : MergeStrategy()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy