Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Kotlin
/
Inline value classes
What is the dependable way to publish a Java-callable function whose Kotlin API accepts a…
from Inline value classes
Kotlin 2.4.10
advanced
1 min
What is the dependable way to publish a Java-callable function whose Kotlin API accepts an inline value class?
Call the generated box-impl method from Java source.
Depend on the mangled Kotlin method name never changing.
Expose an explicit @JvmName bridge, or deliberately opt in to @JvmExposeBoxed and verify the artifact.
Replace the value class with a type alias only for Java callers.
Check
Ask AI about this kata
Report an error
previous kata
Which use site normally requires a boxed representation for @JvmInline value class UserId…
Quiz
next kata
What does this program print?
Predict the output
A new version is available
Reload