Function

Platform and version requirements: JVM (1.0), JS (1.1), Native (1.3)
interface Function<out R>

Represents a value of a functional type, such as a lambda, an anonymous function or a function reference.

Parameters

R - return type of the function.

Extension Functions

Platform and version requirements: JVM (1.0)

reflect

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.

fun <R> Function<R>.reflect(): KFunction<R>?

Inheritors

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)

KFunction

Represents a function with introspection capabilities.

interface KFunction<out R> : KCallable<R>, Function<R>

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-function.html