Skip to content

Conversation

@nvamelichev
Copy link
Collaborator

@nvamelichev nvamelichev commented Jan 24, 2024

Kotlin support is enabled by default if you have kotlin-stdlib AND kotlin-reflection 1.9.x on your classpath.

Note that you can use Kotlin data classes exposed as Java records (@JvmRecord) even if you have NO Kotlin dependencies on your classpath.

Fixes: #7

Kotlin support is enabled by default if you have kotlin-stdlib *AND* kotlin-reflection 1.9.x on your classpath.

Note that you can use Kotlin data classes exposed as Java records (@JvmRecord) even if you have *NO* Kotlin dependencies on your classpath.

Fixes: #7
public final class StdReflector implements Reflector {
public static final Reflector instance = new StdReflector(List.of(
RecordType.FACTORY,
KotlinDataClassTypeFactory.instance,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: instance is static, shoud we call it with UPPER_CASE?

@nvamelichev nvamelichev merged commit 954ed1a into main Jan 26, 2024
@nvamelichev nvamelichev deleted the reflect-kotlin-dataclasses branch January 26, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Kotlin data classes in YOJ

3 participants