W3cubDocs

/Kotlin

<init>

JvmDefault()

Platform and version requirements: JVM

Specifies that a JVM default method should be generated for non-abstract Kotlin interface member.

This annotation requires explicit compilation flag to be enabled: -Xenable-jvm-default. Also this requires jvmTarget 1.8 or higher. Adding or removing this annotation to an interface member is a binary incompatible change.

JvmDefault methods are excluded from interface delegation.

© 2010–2018 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-default/-init-.html