Generate built-in sources of arrays

Extract Array class into a separate file, move arrayOfNulls to Library.kt, fix
formatting and generate Arrays.kt
This commit is contained in:
Alexander Udalov
2014-02-25 19:22:48 +04:00
parent 6e23af2ba3
commit d5e2c4ad4c
8 changed files with 128 additions and 64 deletions
+10
View File
@@ -0,0 +1,10 @@
package kotlin
public class Array<reified T>(public val size: Int, init: Function1<Int, T>) {
public fun get(index: Int): T
public fun set(index: Int, value: T): Unit
public fun iterator(): Iterator<T>
public val indices: IntRange
}
+58 -50
View File
@@ -1,84 +1,92 @@
/*
* Copyright 2010-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Auto-generated file. DO NOT EDIT!
package kotlin
public fun arrayOfNulls<T>(size : Int) : Array<T?>
public class ByteArray(public val size: Int) {
public fun get(index: Int): Byte
public fun set(index: Int, value: Byte): Unit
public class Array<reified T>(public val size : Int, init : Function1<Int, T>) {
public fun get(index : Int) : T
public fun set(index : Int, value : T) : Unit
public fun iterator(): ByteIterator
public fun iterator() : Iterator<T>
public val indices : IntRange
public val indices: IntRange
}
public class ByteArray(public val size : Int) {
public fun get(index : Int) : Byte
public fun set(index : Int, value : Byte) : Unit
public class CharArray(public val size: Int) {
public fun get(index: Int): Char
public fun set(index: Int, value: Char): Unit
public fun iterator() : ByteIterator
public fun iterator(): CharIterator
public val indices : IntRange
public val indices: IntRange
}
public class ShortArray(public val size : Int) {
public fun get(index : Int) : Short
public fun set(index : Int, value : Short) : Unit
public class ShortArray(public val size: Int) {
public fun get(index: Int): Short
public fun set(index: Int, value: Short): Unit
public fun iterator() : ShortIterator
public fun iterator(): ShortIterator
public val indices : IntRange
public val indices: IntRange
}
public class IntArray(public val size : Int) {
public fun get(index : Int) : Int
public fun set(index : Int, value : Int) : Unit
public class IntArray(public val size: Int) {
public fun get(index: Int): Int
public fun set(index: Int, value: Int): Unit
public fun iterator() : IntIterator
public fun iterator(): IntIterator
public val indices : IntRange
public val indices: IntRange
}
public class LongArray(public val size : Int) {
public fun get(index : Int) : Long
public fun set(index : Int, value : Long) : Unit
public class LongArray(public val size: Int) {
public fun get(index: Int): Long
public fun set(index: Int, value: Long): Unit
public fun iterator() : LongIterator
public fun iterator(): LongIterator
public val indices : IntRange
public val indices: IntRange
}
public class FloatArray(public val size : Int) {
public fun get(index : Int) : Float
public fun set(index : Int, value : Float) : Unit
public class FloatArray(public val size: Int) {
public fun get(index: Int): Float
public fun set(index: Int, value: Float): Unit
public fun iterator() : FloatIterator
public fun iterator(): FloatIterator
public val indices : IntRange
public val indices: IntRange
}
public class DoubleArray(public val size : Int) {
public fun get(index : Int) : Double
public fun set(index : Int, value : Double) : Unit
public class DoubleArray(public val size: Int) {
public fun get(index: Int): Double
public fun set(index: Int, value: Double): Unit
public fun iterator() : DoubleIterator
public fun iterator(): DoubleIterator
public val indices : IntRange
public val indices: IntRange
}
public class CharArray(public val size : Int) {
public fun get(index : Int) : Char
public fun set(index : Int, value : Char) : Unit
public class BooleanArray(public val size: Int) {
public fun get(index: Int): Boolean
public fun set(index: Int, value: Boolean): Unit
public fun iterator() : CharIterator
public fun iterator(): BooleanIterator
public val indices : IntRange
public val indices: IntRange
}
public class BooleanArray(public val size : Int) {
public fun get(index : Int) : Boolean
public fun set(index : Int, value : Boolean) : Unit
public fun iterator() : BooleanIterator
public val indices : IntRange
}
+2
View File
@@ -8,3 +8,5 @@ public fun Any?.equals(other: Any?): Boolean
public fun Any?.toString(): String
public fun String?.plus(other: Any?): String
public fun arrayOfNulls<T>(size: Int): Array<T?>