Fix example for Throws annotations.

Improve code escaping and wording for JvmSuppressWildcards.
This commit is contained in:
Ilya Gorbunov
2016-02-18 07:09:15 +03:00
parent a100ffd66b
commit c946d283ff
@@ -70,7 +70,7 @@ annotation class JvmSynthetic
* Example: * Example:
* *
* ``` * ```
* throws(IOException::class) * @Throws(IOException::class)
* fun readFile(name: String): String {...} * fun readFile(name: String): String {...}
* ``` * ```
* *
@@ -96,9 +96,11 @@ annotation class Throws(vararg val exceptionClasses: KClass<out Throwable>)
annotation class JvmField annotation class JvmField
/** /**
* Instructs compiler to generate or omit wildcards for type arguments corresponding to parameters with declaration-site variance. * Instructs compiler to generate or omit wildcards for type arguments corresponding to parameters with
* If the innermost applied @JvmSuppressWildcards has suppress=true, the type is generated as without wildcards. * declaration-site variance, for example such as `Collection<out T>` has.
* If the innermost applied @JvmSuppressWildcards has suppress=false, the type is generated as with wildcards. *
* 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. * It may be helpful only if declaration seems to be inconvenient to use from Java.
*/ */