Making Java more dynamic
summary
Claim: Java can behave dynamically by changing bytecode at runtime. Uses actual tools: Byte Buddy (plus ASM, cglib, Javassist) to subclass, redefine classes, or install a Java agent that transforms classes on load. Proven patterns: Spring/Hibernate/Mockito rely on this; Google uses Byte Buddy; the library reports ~500k downloads and can generate about 10,000 classes per second. Limitations: Android ART/Dalvik prevent full redefinition; hot‑swap can’t add methods yet.
AI-written summary · about
chapters (17)
- 0:00Start
- 2:17Runtime Code Generation
- 2:31Implement the Framework
- 6:15Java Bytecode
- 7:26Bytecode
- 14:44Hibernate
- 19:06Reflection
- 21:20Cogeneration
- 21:59Stack Machine
- 29:45Method Delegation
- 32:44Overview
- 33:30Using Hot Swap
- 36:04Java Agents
- 36:33The Java Agent
- 37:00Instrumentation Instance
- 42:31Dalvik Bytecode
- 43:58Benchmarks
related talks
55mMaking Java More Dynamic
45mMaking Java more dynamic
15mThe Hidden Dynamic Life of Java
18mThe Hidden Dynamic Life of Java
49mByte Buddy, the Other Solution: Bytecode!
14mHow does code hot swapping work, and what are its pitfalls?
55mLiving in the Matrix with Bytecode Manipulation
50mRevealing the magic behind Java annotations
