CountingHandler

internal sealed class CountingHandler : Handler

Game-side handler: counts fires and forwards to the user callback. Implements the bootstrap Handler, whose phase methods all default to no-ops, so each subclass overrides only the ones its patch was woven for.

Inheritors

Constructors

Link copied to clipboard
protected constructor()

Properties

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
abstract 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
open fun onIntercept(key: String?, sig: MethodType?, self: Any?, args: Array<out Any?>?): Any?
Link copied to clipboard
open fun onModify(key: String?, sig: MethodType?, self: Any?, args: Array<out Any?>?, returned: Any?, thrown: Throwable?): Any?