Stop generating deprecated string functions, move to deprecated folder.

This commit is contained in:
Ilya Ryzhenkov
2014-12-02 15:40:50 +03:00
parent 835c74812e
commit 2b8ffeda28
3 changed files with 113 additions and 132 deletions
@@ -5,17 +5,6 @@ import templates.Family.*
fun strings(): List<GenericFunction> {
val templates = arrayListOf<GenericFunction>()
templates add f("appendString(buffer: Appendable, separator: String = \", \", prefix: String = \"\", postfix: String = \"\", limit: Int = -1, truncated: String = \"...\")") {
deprecate{"Use joinTo() instead"}
returns { "Unit" }
exclude(Strings)
body {
"""
joinTo(buffer, separator, prefix, postfix, limit, truncated)
"""
}
}
templates add f("joinTo(buffer: A, separator: String = \", \", prefix: String = \"\", postfix: String = \"\", limit: Int = -1, truncated: String = \"...\")") {
doc {
"""
@@ -62,17 +51,6 @@ fun strings(): List<GenericFunction> {
}
}
templates add f("makeString(separator: String = \", \", prefix: String = \"\", postfix: String = \"\", limit: Int = -1, truncated: String = \"...\")") {
deprecate{"Use joinToString() instead"}
exclude(Strings)
returns("String")
body {
"""
return joinToString(separator, prefix, postfix, limit, truncated)
"""
}
}
templates add f("joinToString(separator: String = \", \", prefix: String = \"\", postfix: String = \"\", limit: Int = -1, truncated: String = \"...\")") {
doc {
"""