Making Java more dynamic
summary
Shows concrete use of ASM/Byte Buddy and the Instrumentation API to generate and rewrite Java bytecode at runtime, not for raw speed but to add behavior without losing type safety. Demonstrates subclassing and delegation to implement an annotation-driven security check, serialization of original code to allow invocation, and live class redefinition via Java agents and advice-style enter/exit hooks (example: System.nanoTime timing). Prototype runs in JVM, works in-place, and avoids runtime-performance penalties claimed for reflection.
AI-written summary · about
chapters (21)
- 0:00Start
- 1:56Security Framework
- 7:10Just-in-Time Compilation
- 11:56Making Java More Dynamic
- 12:39Duck Typing
- 14:27Disclaimer
- 18:12Stack Machine
- 19:18Java Bytecode
- 20:01Manipulating a Class File
- 24:18Hello World Example
- 26:59Method Delegation
- 28:11Dependency Injection
- 29:51Runtime Redefinition
- 30:34Hot Swap
- 30:54Class Reloading Strategy
- 33:00Java Agents
- 34:12Agent Builder
- 34:51Java Agent
- 35:09Instrumentation Interface
- 36:26Dynamic Agent Attachment
- 37:35Dynamic Agent
related talks
55mMaking Java more dynamic
55mMaking Java More Dynamic
50mRevealing the magic behind Java annotations
55mLiving in the Matrix with Bytecode Manipulation
39mThe Java Agent: Modifying Bytecode at Runtime to Protect Against Log4J
30mWriting Java agents for fun and not so much profit
53mWell there's your problem! Your engine's missing! A look under Java's hood
46mJava annotation processing magic for muggles
