MixinHooks

object MixinHooks

Static entry points that the bytecode injected by MixinTransformer calls into. The signatures here are an ABI — MixinTransformer emits INVOKESTATIC calls against these exact names/descriptors, so changing them means changing the transformer too.

Both methods build a MixinContext, run the registered script callback, and hand the context back so the injected code can read cancelled / returnValue.

Functions

Link copied to clipboard
fun head(id: Int, self: Any?, args: Array<Any?>): MixinContext

Called at the HEAD of an injected method. args are the boxed method arguments.

Link copied to clipboard
fun ret(id: Int, self: Any?, args: Array<Any?>, returnValue: Any?): MixinContext

Called at each RETURN site of an injected method. returnValue is the boxed value about to be returned.