kotlin.JLangJVM.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-stdlib Show documentation
Show all versions of kotlin-stdlib Show documentation
Kotlin Standard Library for JVM
package kotlin
import java.lang.annotation.Retention
import java.lang.annotation.RetentionPolicy
import kotlin.jvm.internal.Intrinsic
/**
* This annotation indicates what exceptions should be declared by a function when compiled to a JVM method
*
* Example:
*
* throws(javaClass())
* fun readFile(name: String): String {...}
*
* will be translated to
*
* String readFile(String name) throws IOException {...}
*/
Retention(RetentionPolicy.SOURCE)
public annotation class throws(vararg val exceptionClasses: Class)
[Intrinsic("kotlin.javaClass.property")] public val T.javaClass : Class
get() = (this as java.lang.Object).getClass() as Class
[Intrinsic("kotlin.javaClass.function")] fun javaClass() : Class = null as Class
Retention(RetentionPolicy.SOURCE)
public annotation class volatile
[Intrinsic("kotlin.synchronized")] public fun synchronized(lock: Any, block: () -> R): R = block()
public fun T.annotationType() : Class =
(this as java.lang.annotation.Annotation).annotationType() as Class