Quarkus
Read post

Patch Java classes at build time with Quarkus Shim

Quarkus Shim is a Quarkus extension that lets you patch Java classes from third-party libraries at build time without Java agents or runtime instrumentation. Using annotations like @Shim, @ShimReplace, @ShimAround, @ShimBefore, and @ShimAfter, you can replace method bodies, wrap existing behavior, or inject code before/after method execution. The transformation uses ASM during Quarkus augmentation, works across JVM, dev, and native modes, and validates signatures at build time. It also supports accessing private fields and methods via ShimFields and ShimMethods helpers, and handles overloaded methods via paramTypes. Limitations include inability to patch JDK classes or abstract/native methods.

    #java#quarkus
Jul 17•4m read time•From quarkus.io
Post cover image
1.3K Impressions
Quarkus's image
Quarkus

Quarkus' platform is a modern Java framework optimized for Kubernetes and cloud-native environments,...

175 Followers

•

633 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard