InterceptHandler

Head-side decision. Open only so AroundHandler can add the return observer to it.

Inheritors

Constructors

Link copied to clipboard
constructor(cb: PatchInterceptCallback)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The throwable itself, not a rendering: PatchHandle.lastError hands it out whole and only the status line shortens it.

Link copied to clipboard
open override val phase: Patch.Phase

The blueprint this handler answers for. Carried here rather than passed beside it: the two are one choice, and a separate parameter could disagree with the subclass.

Functions

Link copied to clipboard

A throwing callback is swallowed — the hook only observes, so the patched method must still run. Recording it is therefore the only thing that keeps a broken handler visible to Patches.handle. Two writes and no log line, deliberately: a handler on a hot method throws per call, and logging a stack that often costs more than whatever it was patched to watch.

Link copied to clipboard
open fun onEnter(key: String?, self: Any?, args: Array<out Any?>?)
Link copied to clipboard
open fun onExit(key: String?, self: Any?, args: Array<out Any?>?, returned: Any?, thrown: Throwable?)
Link copied to clipboard
override fun onIntercept(key: String, sig: MethodType, self: Any?, args: Array<Any?>): Any?
Link copied to clipboard
open fun onModify(key: String?, sig: MethodType?, self: Any?, args: Array<out Any?>?, returned: Any?, thrown: Throwable?): Any?