MethodHandle Introspection
summary
Adds limited method-handle introspection to recover the symbolic constant-pool info needed for lambdas, shrinking invokedynamic bootstrap arguments from seven to two and cutting an example classfile overhead from ~560 KB to ~160 KB. Implements a package-private MethodHandleInfo and a reflective getInfo accessor (examples use an Introspector helper to call it), restricts introspection to LDC-able handles and to lookups that pass access checks, and explicitly rules out full method-handle reflection for security and nondeterminism reasons.
AI-written summary · about
chapters (17)
- 0:00Intro
- 0:36Standard disclaimer
- 1:14Lambda (JSR 335) implementation options
- 2:53Lambda metafactory bootstrap method
- 6:10Memory use example: Eclipse plugin directory
- 7:33Lambda metalactory bootstrap method
- 9:05Why are Method Handles a black box?
- 10:55Introspection examples
- 12:00Creating an introspector
- 12:52Roundtripping through the introspector
- 14:26Introspection limitations
- 16:43Introspection implementation
- 18:18Why not full reflection?
- 19:26Security implications
- 21:34Behavioral equivalence
- 28:29Implementation restrictions
- 29:33Conclusion








