Prettify kdocs and exception messages in the generated code.

This commit is contained in:
Ilya Gorbunov
2015-05-27 18:21:17 +03:00
parent fe49a2ee51
commit ae60f7a32f
28 changed files with 1523 additions and 1522 deletions
@@ -7,7 +7,7 @@ fun arrays(): List<GenericFunction> {
templates add f("isEmpty()") {
only(ArraysOfObjects, ArraysOfPrimitives)
doc { "Returns true if the array is empty" }
doc { "Returns `true` if the array is empty." }
returns("Boolean")
body {
"return size() == 0"
@@ -16,7 +16,7 @@ fun arrays(): List<GenericFunction> {
templates add f("isNotEmpty()") {
only(ArraysOfObjects, ArraysOfPrimitives)
doc { "Returns true if the array is not empty" }
doc { "Returns `true` if the array is not empty." }
returns("Boolean")
body {
"return !isEmpty()"
@@ -25,7 +25,7 @@ fun arrays(): List<GenericFunction> {
templates add f("asIterable()") {
only(ArraysOfObjects, ArraysOfPrimitives)
doc { "Returns the Iterable that wraps the original array" }
doc { "Returns the Iterable that wraps the original array." }
returns("Iterable<T>")
body {
"""
@@ -38,7 +38,7 @@ fun arrays(): List<GenericFunction> {
templates add pval("lastIndex") {
only(ArraysOfObjects, ArraysOfPrimitives)
doc { "Returns the last valid index for the array" }
doc { "Returns the last valid index for the array." }
returns("Int")
body {
"get() = size() - 1"
@@ -47,7 +47,7 @@ fun arrays(): List<GenericFunction> {
templates add pval("indices") {
only(ArraysOfObjects, ArraysOfPrimitives)
doc { "Returns the range of valid indices for the array" }
doc { "Returns the range of valid indices for the array." }
returns("IntRange")
body {
"get() = IntRange(0, lastIndex)"