commonMain.io.mths.kava.processor.options.QualifiedOptionName.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kava-processor-jvm Show documentation
Show all versions of kava-processor-jvm Show documentation
The KSP Kava Annotation Processor to generate validation extensions.
package io.mths.kava.processor.options
import kotlin.reflect.KProperty
internal const val prefix = "kava"
internal val KProperty<*>.qualifiedOptionName: String
get() = "$prefix.${name.lowercase()}"
internal fun Set.findQualifiedOption(property: KProperty<*>) =
find { it.lowercase() == property.qualifiedOptionName }