On this page
JvmDefaultWithCompatibility
@Target([AnnotationTarget.CLASS]) annotation class JvmDefaultWithCompatibility
Forces the compiler to generate compatibility accessors for the annotated interface in the DefaultImpls class. Please note that if an interface is annotated with this annotation for binary compatibility, public derived Kotlin interfaces should also be annotated with it, because their DefaultImpls methods will be used to access implementations from the DefaultImpls class of the original interface.
Used only with -Xjvm-default=all. For more details refer to -Xjvm-default documentation.
Constructors
<init>
Forces the compiler to generate compatibility accessors for the annotated interface in the DefaultImpls class. Please note that if an interface is annotated with this annotation for binary compatibility, public derived Kotlin interfaces should also be annotated with it, because their DefaultImpls methods will be used to access implementations from the DefaultImpls class of the original interface.
JvmDefaultWithCompatibility()
Extension Properties
annotationClass
Returns a KClass instance corresponding to the annotation type of this annotation.
val <T : Annotation> T.annotationClass: KClass<out T>
© 2010–2023 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-with-compatibility/