library changes after collections mapping
This commit is contained in:
@@ -9,7 +9,6 @@ import java.util.ArrayList
|
||||
import java.util.TreeMap
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.events.*
|
||||
import java.util.List
|
||||
|
||||
/**
|
||||
* This tool generates JavaScript stubs for classes available in the JDK which are already available in the browser environment
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.jetbrains.kotlin.tools
|
||||
|
||||
import java.io.*
|
||||
import java.util.List
|
||||
|
||||
private val COMMON_AUTOGENERATED_WARNING: String = """//
|
||||
// NOTE THIS FILE IS AUTO-GENERATED by the GenerateStandardLib.kt
|
||||
@@ -116,27 +115,27 @@ fun main(args: Array<String>) {
|
||||
|
||||
// JUtilCollections - methods returning a collection of the same input size (if its a collection)
|
||||
generateFile(File(outDir, "ArraysFromJUtilCollections.kt"), "package kotlin", File(srcDir, "JUtilCollections.kt")) {
|
||||
it.replaceAll("java.util.Collection<T", "Array<T")
|
||||
it.replaceAll("Collection<T", "Array<T")
|
||||
}
|
||||
generateFile(File(outDir, "ArraysFromJUtilCollectionsJVM.kt"), "package kotlin", File(srcDir, "JUtilCollectionsJVM.kt")) {
|
||||
it.replaceAll("java.util.Collection<T", "Array<T")
|
||||
it.replaceAll("Collection<T", "Array<T")
|
||||
}
|
||||
for (arrayName in otherArrayNames) {
|
||||
generateFile(File(outDir, "${arrayName}ArraysFromJUtilCollections.kt"), "package kotlin", File(srcDir, "JUtilCollections.kt")) {
|
||||
replaceGenerics(arrayName, it.replaceAll("<T> java.util.Collection<T>", "${arrayName}Array").
|
||||
replaceAll("java.util.Collection<T>", "${arrayName}Array"))
|
||||
replaceGenerics(arrayName, it.replaceAll("<T> Collection<T>", "${arrayName}Array").
|
||||
replaceAll("Collection<T>", "${arrayName}Array"))
|
||||
}
|
||||
generateFile(File(outDir, "${arrayName}ArraysFromJUtilCollectionsJVM.kt"), "package kotlin", File(srcDir, "JUtilCollectionsJVM.kt")) {
|
||||
replaceGenerics(arrayName, it.replaceAll("<T> java.util.Collection<T>", "${arrayName}Array").
|
||||
replaceAll("java.util.Collection<T>", "${arrayName}Array"))
|
||||
replaceGenerics(arrayName, it.replaceAll("<T> Collection<T>", "${arrayName}Array").
|
||||
replaceAll("Collection<T>", "${arrayName}Array"))
|
||||
}
|
||||
}
|
||||
|
||||
generateFile(File(outDir, "StandardFromJUtilCollections.kt"), "package kotlin", File(srcDir, "JUtilCollections.kt")) {
|
||||
it.replaceAll("java.util.Collection<T", "Iterable<T").replaceAll("(this.size)", "")
|
||||
it.replaceAll("Collection<T", "Iterable<T").replaceAll("(this.size)", "")
|
||||
}
|
||||
generateFile(File(outDir, "StandardFromJUtilCollectionsJVM.kt"), "package kotlin", File(srcDir, "JUtilCollectionsJVM.kt")) {
|
||||
it.replaceAll("java.util.Collection<T", "Iterable<T").replaceAll("(this.size)", "")
|
||||
it.replaceAll("Collection<T", "Iterable<T").replaceAll("(this.size)", "")
|
||||
}
|
||||
|
||||
generateDownTos(File(outDir, "DownTo.kt"), "package kotlin")
|
||||
|
||||
Reference in New Issue
Block a user