Fix example for Throws annotations.
Improve code escaping and wording for JvmSuppressWildcards.
This commit is contained in:
@@ -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<out Throwable>)
|
||||
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<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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user