jvmMain.reflect.ReflectionDumper.kt Maven / Gradle / Ivy
package ch.softappeal.yass2.reflect
import ch.softappeal.yass2.*
import java.util.concurrent.*
import kotlin.reflect.*
import kotlin.reflect.full.*
public fun KClass<*>.properties(): List> = memberProperties
.filter { !isSubclassOf(Throwable::class) || (it.name != "cause" && it.name != "message") }
.sortedBy { it.name }
.map { @Suppress("UNCHECKED_CAST") (it as KProperty1) }
private val Class2dumperProperties = ConcurrentHashMap, List>>()
public val ReflectionDumperProperties: DumperProperties = { type ->
Class2dumperProperties.computeIfAbsent(type) { type.properties() }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy