Docs: improve code formatting in PurelyImplements docs, fix MutableList fq-name in example.
This commit is contained in:
@@ -22,17 +22,27 @@ package kotlin.jvm
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ```java
|
||||
* class MyList<T> extends AbstractList<T> { ... }
|
||||
* ```
|
||||
*
|
||||
* Methods defined in MyList<T> use T as platform, i.e. it's possible to perform unsafe operation in Kotlin:
|
||||
* Methods defined in `MyList<T>` use `T` as platform, i.e. it's possible to perform unsafe operation in Kotlin:
|
||||
*
|
||||
* ```kotlin
|
||||
* MyList<Int>().add(null) // compiles
|
||||
* ```
|
||||
*
|
||||
* @PurelyImplements("kotlin.MutableList")
|
||||
* ```java
|
||||
* @PurelyImplements("kotlin.collections.MutableList")
|
||||
* class MyPureList<T> extends AbstractList<T> { ... }
|
||||
* ```
|
||||
*
|
||||
* Methods defined in MyPureList<T> overriding methods in MutableList use T as non-platform types:
|
||||
* Methods defined in `MyPureList<T>` overriding methods in `MutableList` use `T` as non-platform types:
|
||||
*
|
||||
* ```kotlin
|
||||
* MyList<Int>().add(null) // Error
|
||||
* MyList<Int?>().add(null) // Ok
|
||||
* ```
|
||||
*/
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<sequential>
|
||||
<echo message="Building stdlib docs for JRE @{jdk.version}" />
|
||||
<dokka src="stdlib/src:@{additional.src}:../core/builtins:../core/reflection.jvm:../core/runtime.jvm/src/kotlin/jvm/annotations:../core/runtime.jvm/src/kotlin/jvm/JvmClassMapping.kt"
|
||||
<dokka src="stdlib/src:@{additional.src}:../core/builtins:../core/reflection.jvm:../core/runtime.jvm/src/kotlin/jvm/annotations:../core/runtime.jvm/src/kotlin/jvm/JvmClassMapping.kt:../core/runtime.jvm/src/kotlin/jvm/PurelyImplements.kt"
|
||||
samples="stdlib/samples/src" outputDir="${output}/jre@{jdk.version}" moduleName="kotlin-stdlib" skipDeprecated="true" outputFormat="kotlin-website" jdkversion="@{jdk.version}"
|
||||
include="stdlib/src/Module.md">
|
||||
<sourcelink path=".." url="http://github.com/JetBrains/kotlin/blob/${github.revision}" linesuffix="#L"/>
|
||||
|
||||
Reference in New Issue
Block a user