klyn.reflection.EvalFunctionWrapper.invoke
method

    public invoke(args as Object[]) as ReturnType throws Exception:

Description

Invokes the function with dynamic arguments.

Parameters

- args Arguments packaged as `Object[]`.

Returns

Result cast to `ReturnType`. ```klyn import klyn.reflection f = eval("""def add(a as Int, b as Int) as Int: return a + b""") as Invocable<Int> print(f.invoke([10, 20])) # 30` ``

Throws

- Exception if argument binding fails or the invoked constructor, method, or function throws an exception.