Skip to main content

Module lambda

Module lambda 

Source
Expand description

Lambda/method-reference target extraction from the BootstrapMethods attribute.

JVM compilers (javac, kotlinc, scalac, etc.) compile lambda expressions and method references into invokedynamic instructions whose bootstrap method is java/lang/invoke/LambdaMetafactory.metafactory (or altMetafactory). The third bootstrap argument (index 2) of such entries is a CONSTANT_MethodHandle_info that points to the actual target method being captured.

This module extracts those targets from a parsed cafebabe::ClassFile and returns them as LambdaTargetStub records for inclusion in the class stub.

Functionsยง

extract_lambda_targets
Extract lambda/method-reference targets from a parsed class file.