From c946d283ff95ad50e6f838eb2b59e9479cfa47f6 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Thu, 18 Feb 2016 07:09:15 +0300 Subject: [PATCH] Fix example for Throws annotations. Improve code escaping and wording for JvmSuppressWildcards. --- .../kotlin/jvm/annotations/JvmPlatformAnnotations.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/runtime.jvm/src/kotlin/jvm/annotations/JvmPlatformAnnotations.kt b/core/runtime.jvm/src/kotlin/jvm/annotations/JvmPlatformAnnotations.kt index 4cf6a9a0ffc..d9fbfe7aa61 100644 --- a/core/runtime.jvm/src/kotlin/jvm/annotations/JvmPlatformAnnotations.kt +++ b/core/runtime.jvm/src/kotlin/jvm/annotations/JvmPlatformAnnotations.kt @@ -70,7 +70,7 @@ annotation class JvmSynthetic * Example: * * ``` - * throws(IOException::class) + * @Throws(IOException::class) * fun readFile(name: String): String {...} * ``` * @@ -96,9 +96,11 @@ annotation class Throws(vararg val exceptionClasses: KClass) annotation class JvmField /** - * Instructs compiler to generate or omit wildcards for type arguments corresponding to parameters with declaration-site variance. - * If the innermost applied @JvmSuppressWildcards has suppress=true, the type is generated as without wildcards. - * If the innermost applied @JvmSuppressWildcards has suppress=false, the type is generated as with wildcards. + * Instructs compiler to generate or omit wildcards for type arguments corresponding to parameters with + * declaration-site variance, for example such as `Collection` 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. */