interface Function<out R>
Represents a value of a functional type, such as a lambda, an anonymous function or a function reference.
R - return type of the function.
open operator fun equals(other: Any?): Boolean
Indicates whether some other object is "equal to" this one. Implementations must fulfil the following requirements:
open fun hashCode(): Int
Returns a hash code value for the object. The general contract of hashCode is:
open fun toString(): String
Returns a string representation of the object.
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.
interface KFunction<out R> : KCallable<R>, Function<R>
Represents a function with introspection capabilities.
© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.