JvmSuppressWildcards

Platform and version requirements: JVM (1.0)
@Target([AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.TYPE]) annotation class JvmSuppressWildcards

Instructs compiler to generate or omit wildcards for type arguments corresponding to parameters with declaration-site variance, for example such as Collection<out T> has.

If the innermost applied @JvmSuppressWildcards has suppress=true, the type is generated without wildcards. If the innermost applied @JvmSuppressWildcards has suppress=false, the type is generated with wildcards.

It may be helpful only if declaration seems to be inconvenient to use from Java.

Constructors

Platform and version requirements: JVM (1.0)

<init>

Instructs compiler to generate or omit wildcards for type arguments corresponding to parameters with declaration-site variance, for example such as Collection<out T> has.

<init>(suppress: Boolean = true)

Properties

Platform and version requirements: JVM (1.0)

suppress

val suppress: Boolean

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