~/talk

The Craft of Metaprogramming on JVM

Talkat JavaDay Lviv 2015 · on Sunday, 2015-06-14· [compilers-and-language-design, java]
links:none on file
slides:none on file

Shows how to find classes annotated with @Command, scan packages, and then alter bytecode to inject behavior: adding constructors, inserting entry/exit calls, and even swapping in a generated superclass so existing instances adopt new behavior — demo compiles, scans, and loads those modified classes successfully. Uses ASM/Javassist/CGLIB for bytecode changes and Java agent (load-time instrumentation) or build-time weaving as the three deployment options; warns agents need JVM flags and that interfaces/signatures can’t be freely changed at runtime.

AI-written summary · about

  1. 0:00Introduction to metaprogramming
  2. 3:33Instrumentation code basics
  3. 8:02Java constraints for metaprogramming
  4. 13:25Key challenges in JVM metaprogramming
  5. 17:12When metaprogramming is justified
  6. 21:09Tools for JVM metaprogramming
  7. 26:04Java agents and class loading
  8. 30:18Live demo setup
  9. 35:17Finding annotated classes
  10. 39:50Injecting behavior dynamically
  11. 42:25Changing class inheritance
  12. 46:20Demo results and implications
  13. 49:00Q&A and closing remarks
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.