Package-level declarations
Types
Self-attach + bootstrap-bridge injection, isolated from any class that references a bridge type.
Which method owns a source line, read from the class file's LineNumberTable — the descriptor a StackTraceElement does not carry, and the only thing that separates same-named obf overloads.
What a writable patch's callback answers with. Built only by Patches.proceed / Patches.returns, so a script never names this type.
How a failed or ambiguous patch target is described back to the caller.
@OnMethodEnter body ByteBuddy copies (inlines) into the head of every entry-patched method.@OnMethodExit body ByteBuddy copies (inlines) into every exit of an exit-patched method.One live patch: its id, what it wove, and how it has behaved since. Returned by Patches.onEnter / Patches.onExit and read back later by Patches.handle.
Patches.intercept("...", "...") { key, self, args -> ... }.Advice.withCustomMapping().bind(...) — so the woven value is byte-identical to the value the handler was registered under.Patches.modify("...", "...") { key, self, args, returned, thrown -> ... }.Warms the patch engine on a background thread at init, so the first script calling Patches doesn't pay the self-attach and ByteBuddy's class loading on a tick thread — seconds of it where no flag permits a direct self-attach and ByteBuddy falls back to spawning a second JVM to attach on its behalf.
retransformClasses is varargs, and Kotlin's spread reallocates the array in front of every such call.Name and signature normalization, shared by patch resolution (Patch) and by the diagnostics it throws.
Everything undoing an install takes, the way Patch.Weave is everything applying one takes.
One woven method: the label PatchHandle.targets shows, and the runtime parameter types it was rendered from — kept structured so Patches.removeEnter can filter through Signatures.matches, the comparison that picked the target, instead of reading the label back apart.
Functions
rt's wrapper if it is primitive, else rt itself. MethodType.methodType(rt).wrap() answers the same, but interns a MethodType per call on a path that runs per fire — and it puts MethodType on that path, where patching it would take every writable patch with it. === and not ==, so no Object.equals joins it there either; javaObjectType reads like a getter but the compiler folds it to an LDC.