kotlin.reflect.jvm
Package kotlin.reflect.jvm
Platform and version requirements: JVM
Runtime API for interoperability between Kotlin reflection and Java reflection provided by kotlin-reflect
library.
Extensions for External Classes
Properties
var KCallable<*>.isAccessible: Boolean Provides a way to suppress JVM access checks for a callable. | |
val <T> KFunction<T>.javaConstructor: Constructor<T>? Returns a Java Constructor instance corresponding to the given Kotlin function, or | |
val KProperty<*>.javaField: Field? Returns a Java Field instance corresponding to the backing field of the given property, or | |
val KProperty<*>.javaGetter: Method? Returns a Java Method instance corresponding to the getter of the given property, or | |
val KFunction<*>.javaMethod: Method? Returns a Java Method instance corresponding to the given Kotlin function, or | |
val KMutableProperty<*>.javaSetter: Method? Returns a Java Method instance corresponding to the setter of the given mutable property, or | |
val KType.javaType: Type Returns a Java Type instance corresponding to the given Kotlin type. Note that one Kotlin type may correspond to different JVM types depending on where it appears. For example, Unit corresponds to the JVM class Unit when it's the type of a parameter, or to | |
val KType.jvmErasure: KClass<*> Returns the KClass instance representing the runtime class to which this type is erased to on JVM. | |
val KClass<*>.jvmName: String Returns the JVM name of the class represented by this KClass instance. |
Functions
fun <R> Function<R>.reflect(): KFunction<R>? This is an experimental API. Given a class for a compiled Kotlin lambda or a function expression, returns a KFunction instance providing introspection capabilities for that lambda or function expression and its parameters. Not all features are currently supported, in particular KCallable.call and KCallable.callBy will fail at the moment. |
© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect.jvm/