invoke

fun invoke(overrides: Map<String, Any?> = emptyMap(), instance: Any? = Unit, extension: Any? = Unit): R

Invoke the wrapped function.

You can provide overrides for parameters via overrides, instance and extension. Otherwise:

  • for regular value parameters, a value with a corresponding type (and, if provided, qualifiers) will be injected

  • for the instance or extension receiver parameters, this function will throw an exception.

Returns the value the underlying function returns.

If this function fails, you can use checkCallable with the same arguments to debug what may have gone wrong.