JvmDefaultWithoutCompatibility

Platform and version requirements: JVM (1.4)
@Target([AnnotationTarget.CLASS]) annotation class JvmDefaultWithoutCompatibility

Prevents the compiler from generating compatibility accessors for the annotated class or interface, and suppresses any related compatibility warnings. In other words, this annotation makes the compiler generate the annotated class or interface in the -Xjvm-default=all mode, where only JVM default methods are generated, without DefaultImpls.

Annotating an existing class with this annotation is a binary incompatible change. Therefore this annotation makes the most sense for new classes in libraries which opted into the compatibility mode.

Used only with -Xjvm-default=compatibility|all-compatibility.

Constructors

Platform and version requirements: JVM (1.0)

<init>

Prevents the compiler from generating compatibility accessors for the annotated class or interface, and suppresses any related compatibility warnings. In other words, this annotation makes the compiler generate the annotated class or interface in the -Xjvm-default=all mode, where only JVM default methods are generated, without DefaultImpls.

JvmDefaultWithoutCompatibility()

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-default-without-compatibility/index.html