onExit

open fun onExit(key: String, self: Any, args: Array<Any>, returned: Any, thrown: Throwable)

Exit phase: the patched method is leaving, by return or by throw.

Parameters

key

the patch key that fired

self

the receiver of the patched method (null for static methods)

args

the argument slots as they stand at exit, boxed — the body may have reassigned them, so these are not necessarily the values the method was called with

returned

the return value, boxed; null for void, and meaningless when thrown is non-null (a throwing method has no return value)

thrown

the exception leaving the method, or null on a normal return