callback

open fun <C, A> callback(callbackType: Class<C>, callbackInstance: C, argument: A, additionalArguments: Array<Any>): LambdaSafe.Callback<C, A>

Start a call to a single callback instance, dealing with common generic type concerns and exceptions.

Return

a Callback instance that can be invoked.

Parameters

callbackType

the callback type (a functional interface)

callbackInstance

the callback instance (may be a lambda)

argument

the primary argument passed to the callback

additionalArguments

any additional arguments passed to the callback

<C>

the callback type

<A>

the primary argument type