use new syntax for annotations

This commit is contained in:
Dmitry Jemerov
2015-05-28 14:14:05 +02:00
parent 68eca8bc00
commit 0e5b6c41dd
3 changed files with 13 additions and 13 deletions
@@ -9,48 +9,48 @@ import kotlin.jvm.internal.Intrinsic
/** /**
* Returns an array containing the specified elements. * Returns an array containing the specified elements.
*/ */
[Intrinsic("kotlin.arrays.array")] public fun <reified T> arrayOf(vararg t : T) : Array<T> = t as Array<T> @Intrinsic("kotlin.arrays.array") public fun <reified T> arrayOf(vararg t : T) : Array<T> = t as Array<T>
// "constructors" for primitive types array // "constructors" for primitive types array
/** /**
* Returns an array containing the specified [Double] numbers. * Returns an array containing the specified [Double] numbers.
*/ */
[Intrinsic("kotlin.arrays.array")] public fun doubleArrayOf(vararg content : Double) : DoubleArray = content @Intrinsic("kotlin.arrays.array") public fun doubleArrayOf(vararg content : Double) : DoubleArray = content
/** /**
* Returns an array containing the specified [Float] numbers. * Returns an array containing the specified [Float] numbers.
*/ */
[Intrinsic("kotlin.arrays.array")] public fun floatArrayOf(vararg content : Float) : FloatArray = content @Intrinsic("kotlin.arrays.array") public fun floatArrayOf(vararg content : Float) : FloatArray = content
/** /**
* Returns an array containing the specified [Long] numbers. * Returns an array containing the specified [Long] numbers.
*/ */
[Intrinsic("kotlin.arrays.array")] public fun longArrayOf(vararg content : Long) : LongArray = content @Intrinsic("kotlin.arrays.array") public fun longArrayOf(vararg content : Long) : LongArray = content
/** /**
* Returns an array containing the specified [Int] numbers. * Returns an array containing the specified [Int] numbers.
*/ */
[Intrinsic("kotlin.arrays.array")] public fun intArrayOf(vararg content : Int) : IntArray = content @Intrinsic("kotlin.arrays.array") public fun intArrayOf(vararg content : Int) : IntArray = content
/** /**
* Returns an array containing the specified characters. * Returns an array containing the specified characters.
*/ */
[Intrinsic("kotlin.arrays.array")] public fun charArrayOf(vararg content : Char) : CharArray = content @Intrinsic("kotlin.arrays.array") public fun charArrayOf(vararg content : Char) : CharArray = content
/** /**
* Returns an array containing the specified [Short] numbers. * Returns an array containing the specified [Short] numbers.
*/ */
[Intrinsic("kotlin.arrays.array")] public fun shortArrayOf(vararg content : Short) : ShortArray = content @Intrinsic("kotlin.arrays.array") public fun shortArrayOf(vararg content : Short) : ShortArray = content
/** /**
* Returns an array containing the specified [Byte] numbers. * Returns an array containing the specified [Byte] numbers.
*/ */
[Intrinsic("kotlin.arrays.array")] public fun byteArrayOf(vararg content : Byte) : ByteArray = content @Intrinsic("kotlin.arrays.array") public fun byteArrayOf(vararg content : Byte) : ByteArray = content
/** /**
* Returns an array containing the specified boolean values. * Returns an array containing the specified boolean values.
*/ */
[Intrinsic("kotlin.arrays.array")] public fun booleanArrayOf(vararg content : Boolean) : BooleanArray = content @Intrinsic("kotlin.arrays.array") public fun booleanArrayOf(vararg content : Boolean) : BooleanArray = content
/** /**
@@ -19,9 +19,9 @@ package kotlin.jvm.internal.unsafe
import kotlin.jvm.internal.Intrinsic import kotlin.jvm.internal.Intrinsic
/** @suppress */ /** @suppress */
[Intrinsic("kotlin.jvm.internal.unsafe.monitorEnter")] @Intrinsic("kotlin.jvm.internal.unsafe.monitorEnter")
public fun monitorEnter(monitor: Any): Unit = throw UnsupportedOperationException("This function can only be used privately") public fun monitorEnter(monitor: Any): Unit = throw UnsupportedOperationException("This function can only be used privately")
/** @suppress */ /** @suppress */
[Intrinsic("kotlin.jvm.internal.unsafe.monitorExit")] @Intrinsic("kotlin.jvm.internal.unsafe.monitorExit")
public fun monitorExit(monitor: Any): Unit = throw UnsupportedOperationException("This function can only be used privately") public fun monitorExit(monitor: Any): Unit = throw UnsupportedOperationException("This function can only be used privately")
+2 -2
View File
@@ -30,13 +30,13 @@ public annotation class throws(public vararg val exceptionClasses: KClass<out Th
/** /**
* Returns the runtime Java class of this object. * Returns the runtime Java class of this object.
*/ */
[Intrinsic("kotlin.javaClass.property")] public val <T: Any> T.javaClass : Class<T> @Intrinsic("kotlin.javaClass.property") public val <T: Any> T.javaClass : Class<T>
get() = (this as java.lang.Object).getClass() as Class<T> get() = (this as java.lang.Object).getClass() as Class<T>
/** /**
* Returns the Java class for the specified type. * Returns the Java class for the specified type.
*/ */
[Intrinsic("kotlin.javaClass.function")] public fun <reified T: Any> javaClass(): Class<T> = null as Class<T> @Intrinsic("kotlin.javaClass.function") public fun <reified T: Any> javaClass(): Class<T> = null as Class<T>
/** /**
* Executes the given function [block] while holding the monitor of the given object [lock]. * Executes the given function [block] while holding the monitor of the given object [lock].