Add isKotlinDataClass
to KotlinDetector
#32937
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: declined
A suggestion or change that we don't feel we should currently apply
theme: kotlin
An issue related to Kotlin support
Checking whether a class is a Kotlin data class would be useful. For example, we might want to use different binder (mapper) by the kind of the target class. Here's a comment that wants a way to detect: spring-projects/spring-batch#4568 (comment)
I found that
BindingReflectionHintsRegistrar
usesKClass#isData()
only when a type is Kotlin type:spring-framework/spring-core/src/main/java/org/springframework/aot/hint/BindingReflectionHintsRegistrar.java
Lines 223 to 224 in df238d0
I think that this pattern would be useful when provided as an utility function like:
The text was updated successfully, but these errors were encountered: