UnsafeMethodAdvice

Universal method advice for unsafe runtime injections. Supports: - before/after dispatch - cancellable execution (skip original body) - return value override - argument mutation (via shared args array)

Functions

Link copied to clipboard
@Advice.OnMethodEnter(skipOn = OnNonDefaultValue::class, suppress = Throwable::class)
open fun onEnter(@Advice.Origin method: Method, @Advice.This(optional = true) instance: Any, @Advice.AllArguments args: Array<Any>): UnsafeInjectionManager.EnterState
Link copied to clipboard
@Advice.OnMethodExit(onThrowable = Throwable::class, suppress = Throwable::class)
open fun onExit(@Advice.Origin method: Method, @Advice.This(optional = true) instance: Any, @Advice.AllArguments args: Array<Any>, @Advice.Enter enterState: UnsafeInjectionManager.EnterState, @Advice.Return(readOnly = false, typing = Assigner.Typing.DYNAMIC) result: Any, @Advice.Thrown(readOnly = false) throwable: Throwable)