PatchModifyAdvice
class PatchModifyAdvice
Return-side decision: replace the return value. Only the exit end is woven.
skipOnDefaultValue = false, the opposite of PatchInterceptAdvice: the body ran, so the slot holds a real value and "returned null" cannot mean "leave it alone" without making replacement-with-null unexpressible. The bridge hands returned back instead, and every exit pays one assignment.
Advice.Thrown is read-only: a throwing method still throws, and the substitute is discarded.
See also
for the head-side decision
Companion functions
Link copied to clipboard
open fun exit(slot: Int, key: String, @Advice.Origin sig: MethodType, @Advice.This(optional = true
The inlined
@OnMethodExit body: hand the exit to fireModify and let the post-processor assign whatever comes back.