diff options
author | Marcin Aman <maman@virtuslab.com> | 2020-05-25 14:40:59 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-06-03 11:45:54 +0200 |
commit | f0742fb7f8a937ef7c2e5a92d6f4a0fd079baa62 (patch) | |
tree | f7c7b8c7844b862b784a1651db5a4cb235207e41 /core/src/main/kotlin | |
parent | 02ddcd61dea19efd60c0da972ac0b5bd1d6ebf89 (diff) | |
download | dokka-f0742fb7f8a937ef7c2e5a92d6f4a0fd079baa62.tar.gz dokka-f0742fb7f8a937ef7c2e5a92d6f4a0fd079baa62.tar.bz2 dokka-f0742fb7f8a937ef7c2e5a92d6f4a0fd079baa62.zip |
Enum constructor values
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r-- | core/src/main/kotlin/model/aditionalExtras.kt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/src/main/kotlin/model/aditionalExtras.kt b/core/src/main/kotlin/model/aditionalExtras.kt index f71852c4..055fc5a6 100644 --- a/core/src/main/kotlin/model/aditionalExtras.kt +++ b/core/src/main/kotlin/model/aditionalExtras.kt @@ -59,4 +59,15 @@ data class ActualTypealias(val underlyingType: SourceSetDependent<Bound>) : Extr } override val key: ExtraProperty.Key<DClasslike, ActualTypealias> = ActualTypealias +} + +data class ConstructorValues(val values: List<String>) : ExtraProperty<DEnumEntry>{ + companion object : ExtraProperty.Key<DEnumEntry, ConstructorValues> { + override fun mergeStrategyFor(left: ConstructorValues, right: ConstructorValues) = + MergeStrategy.Fail{ + throw IllegalArgumentException("Merging constructor parameters not applicable") + } + } + + override val key: ExtraProperty.Key<DEnumEntry, ConstructorValues> = ConstructorValues }
\ No newline at end of file |