This tutorial demonstrates static proxy (decorator pattern), JDK dynamic proxy (interface-based), CGLIB dynamic proxy (subclassing), and Spring AOP's dual-proxy implementation with @EnableAspectJAutoProxy, using an EmployeeService example that adds C# and Go skills without modifying original code.
This article explains CGLIB, a high‑performance bytecode library for creating Java dynamic proxies without interfaces, walks through implementation steps and core source‑code analysis, details the FastClass optimization that bypasses reflection, and compares CGLIB with JDK dynamic proxies.
The third article in the Presto SQL Engine series demonstrates how to implement WHERE‑clause filtering with Antlr, contrasting a direct AST‑traversal visitor approach—hampered by branch prediction and JVM inlining issues—with runtime bytecode generation using airlift.bytecode, which yields roughly three‑fold speed gains but adds complexity.