SimpleFunction
The result of inspekting simple function declaration, i.e. one declared with fun.
Properties
All annotations on this element with their source information.
All annotations on this element, including inherited ones.
Annotations declared directly on this element.
If the declaration is inherited from a superclass (not overridden), the superclass it is inherited from.
Whether the declaration is abstract. If checking whether you can invoke a function, use FunctionLike.isInvokable instead of this.
Whether the declaration is declared in its owning class. False if it is inherited.
Whether the method can be invoked. Almost always equal to !isAbstract, but may be false if conditions (such as reified type parameters) prevent generating an invoker lambda.
Whether the referenced function is suspending. If true, calling invoke will error - use invokeSuspend instead.
Whether the declaration is top-level (not a member of a class).
The fully qualified name of the declaration.
The parameters of the declaration.
The return type of the function.
Functions
Get the first annotation of type T, or null if none is found.
Get all annotations of type T.
Builds an ArgumentList for a set of parameters. Parameters which are not set will use their default values if they have one. Successfully building an ArgumentList guarantees that values are provided for all parameters without default values.
Invoke the referenced function with the given parameters. Will error if the underlying function is suspend.
Invoke the referenced suspend function with the given parameters. If the function is not suspend, this will still invoke it without an error.