Class LambdaMetafactoryModel

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

public class LambdaMetafactoryModel extends Object implements MethodEffectModel
Resolves invokedynamic call sites bootstrapped by java.lang.invoke.LambdaMetafactory whose target is a plain static method - every non-capturing lambda body and every static method reference - by reading the target directly out of the bootstrap's MethodHandle constant. Unlike reflection this needs no external trace/log - the compiler emits the exact target as constant bootstrap data - so the resolution is sound, not heuristic. 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.