klyn.reflection.Invocable.invoke
method

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

Description

Invokes the entity with dynamic arguments.

Parameters

Parameter | Description
--- | ---
`args` | Arguments as Object array (use empty array for no args).

Returns

Result of type ReturnType.

Throws

- IllegalArgumentException if arguments don't match signature.
- Exception if invocation fails.

Example

    import klyn.reflection

    f = eval("def fct(a as Int, b as Int): return a + b")
    result = f.invoke([10, 20]) as Int