commonMain.co.touchlab.skie.configuration.ConfigurationTarget.kt Maven / Gradle / Ivy
package co.touchlab.skie.configuration
import kotlin.reflect.KClass
interface ConfigurationTarget {
fun hasAnnotation(kClass: KClass): Boolean
fun findAnnotation(kClass: KClass): T?
}
inline fun ConfigurationTarget.hasAnnotation(): Boolean =
this.hasAnnotation(T::class)
inline fun ConfigurationTarget.findAnnotation(): T? =
this.findAnnotation(T::class)