W3cubDocs

/Kotlin

JvmDefault

@Target([AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY]) annotation class JvmDefault

Platform and version requirements: Kotlin 1.2, 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.

Constructors

<init>

JvmDefault()

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

© 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/index.html