Class LambdaMetafactoryModel

java.lang.Object
qilin.core.invokedynamic.LambdaMetafactoryModel
All Implemented Interfaces:
MethodEffectModel

public class LambdaMetafactoryModel extends Object implements MethodEffectModel
Precisely models invokedynamic call sites whose DynamicInvokeResolver target is a non-capturing static LambdaMetafactory implementation - every non-capturing lambda body and every static method reference. Splices in a synthetic allocation of the functional-interface type (registered with PAG.registerLambdaTarget(java.lang.Object, sootup.core.signatures.MethodSignature, sootup.core.jimple.common.constant.MethodHandle.Kind) so it becomes a LambdaAllocNode instead of a plain one) before the original invokedynamic statement, which is left untouched - mirroring how ReflectionModel augments rather than replaces the original call. Calls on that object then dispatch straight to the target, with the functional interface's arguments bound.

All other targets (captured values, instance/constructor refs) are called from the invokedynamic statement itself, like CHA/RTA/Spark do - see CallGraphBuilder#addDynamicInvokeEdge.