Using Byte Buddy for proxy creation
A guide to migrating from cglib to Byte Buddy for Java proxy creation, focusing on API differences and implementation for Java 17 compatibility.
Rafael Winterhalter explains how to use Byte Buddy for runtime proxy creation in modern Java, covering migration from cglib, method interception, and efficient class caching under Java 17.
21 articles from this blog
A guide to migrating from cglib to Byte Buddy for Java proxy creation, focusing on API differences and implementation for Java 17 compatibility.
Explains the transition from Java EE to Jakarta EE, focusing on the namespace change from javax to jakarta due to trademark and licensing issues.
Explains Java 11's constantdynamic feature, a JVM instruction for lazy constant creation, and demonstrates its use with Byte Buddy.
Explains the removal of sun.misc.Unsafe.defineClass in JDK 11 and the new, more secure class definition API using MethodHandles.Lookup.
Analysis of the Java 9 Jigsaw module system debate, covering compatibility concerns and objections from major vendors like Red Hat and IBM.
A developer details the challenges of building a Java tracing agent for distributed systems, focusing on asynchronous execution and its impact on garbage collection.
A developer expresses gratitude after being elected a Java Champion, thanking mentors, community members, and supporters.
Analysis of Project Jigsaw's delays and challenges in Java 9, discussing the technical complexities of introducing a module system.
Explains the invokedynamic JVM instruction, its role in Java 8 lambdas, dynamic languages, and how it works with method handles.
Explains how to implement annotation-based APIs in Java using runtime code generation, moving beyond simple markers to add real program logic.
Explains how Java 8's default methods, while useful for API evolution, can unexpectedly break existing user code and cause compilation errors.
Explains the sun.misc.Unsafe class in Java, its uses for low-level programming, and its future in the Java API.
Introducing a lightweight, declarative Java library for parsing custom file formats using annotated beans and enhanced regular expressions.
A technical guide to cglib, a Java bytecode manipulation library used for dynamic proxy generation, mocking, and instrumentation.
Explains a Java class loading anomaly where static enum fields in annotations cause runtime class loading, unlike static String fields.
A guide to extending Google Guava caches to overflow to disk, enabling persistence and specific value invalidation not easily achieved with Ehcache.
Explains how to use Guava's caches for fine-grained, object-based locking to improve concurrency in Java web applications.
Explains the principles of subtyping in Java generics, including why generic types like List<Number> are not supertypes of List<Integer>.
Explores Java generics, type erasure, and how to retrieve generic type arguments at runtime despite common misconceptions.
Explains how memory leaks occur in Java despite automatic garbage collection, with examples from stack implementation and observer patterns.