IntentionallyKotlinOnlyApi
Acknowledges that the annotated function - or every function inside the annotated class - is deliberately Kotlin-only API left visible to Java sources.
The library-api-watchdog compiler plugin warns, in JVM compilations, about publicly visible functions whose shape only Kotlin callers can use idiomatically: suspend functions (Java sees a trailing Continuation parameter it can't provide idiomatically), inline functions with a reified type parameter (calling the compiled method from Java fails at runtime), and functions taking a Kotlin-specific function type - a suspend function type, a function type with receiver, or a Unit-returning function type. Prefer hiding such members from Java with @JvmSynthetic, or provide a Java-friendly alternative alongside (a blocking or CompletableFuture-returning bridge, a fun interface parameter), and apply this annotation to suppress the warning when leaving the Kotlin-only shape visible to Java is intended. On a class it covers every function declared inside.
See the check documentation for rationale and examples.
Parameters
why the Kotlin-only shape deliberately stays visible to Java.
free-form explanation of the exemption. May be empty only when reason explains the exemption on its own (ExemptionReason.FOR_BACKWARDS_COMPATIBILITY, ExemptionReason.API_DESIGN).