kotlin.jvm
Package kotlin.jvm
Platform and version requirements: JVM
Functions and annotations specific to the Java platform-
Annotations
annotation class JvmField Instructs the Kotlin compiler not to generate getters/setters for this property and expose it as a field. | |
annotation class JvmMultifileClass Instructs the Kotlin compiler to generate a multifile class with top-level functions and properties declared in this file as one of its parts. Name of the corresponding multifile class is provided by the JvmName annotation. | |
annotation class JvmName Specifies the name for the Java class or method which is generated from this element. | |
annotation class JvmOverloads Instructs the Kotlin compiler to generate overloads for this function that substitute default parameter values. | |
annotation class JvmStatic Specifies that a static method or field needs to be generated from this element. | |
annotation class JvmSuppressWildcards Instructs compiler to generate or omit wildcards for type arguments corresponding to parameters with declaration-site variance, for example such as | |
annotation class JvmSynthetic | |
annotation class JvmWildcard Instructs compiler to generate wildcard for annotated type arguments corresponding to parameters with declaration-site variance. | |
annotation class PurelyImplements Instructs the Kotlin compiler to treat annotated Java class as pure implementation of given Kotlin interface. "Pure" means here that each type parameter of class becomes non-platform type argument of that interface. | |
annotation class Strictfp Marks the JVM method generated from the annotated function as | |
annotation class Synchronized Marks the JVM method generated from the annotated function as | |
annotation class Throws This annotation indicates what exceptions should be declared by a function when compiled to a JVM method. | |
annotation class Transient Marks the JVM backing field of the annotated property as | |
annotation class Volatile Marks the JVM backing field of the annotated property as |
Extensions for External Classes
Properties
val <T : Annotation> T.annotationClass: KClass<out T> Returns a KClass instance corresponding to the annotation type of this annotation. | |
val <T> KClass<T>.java: Class<T> Returns a Java Class instance corresponding to the given KClass instance. | |
val <T : Any> T.javaClass: Class<T> Returns the runtime Java class of this object. | |
val <T : Any> KClass<T>.javaObjectType: Class<T> Returns a Java Class instance corresponding to the given KClass instance. In case of primitive types it returns corresponding wrapper classes. | |
val <T : Any> KClass<T>.javaPrimitiveType: Class<T>? Returns a Java Class instance representing the primitive type corresponding to the given KClass if it exists. |
Functions
fun <T : Any> Array<*>.isArrayOf(): Boolean Checks if array can contain element of type T. |
© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/