Class LambdaMetafactoryModel

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

public class LambdaMetafactoryModel extends Object implements MethodEffectModel
Models the objects LambdaMetafactory invokedynamic call sites create (lambdas and method references, see FunctionalObject). Before each such call site r = indy(c_0, ...), splices in a synthetic allocation of the functional-interface type (registered with PAG.registerLambdaTarget(java.lang.Object, sootup.callgraph.invokedynamic.FunctionalObject) so it becomes a LambdaAllocNode) and stores the captured values into it: r = new FI; r.<capture field 0> = c_0; .... The original statement is left untouched - mirroring how ReflectionModel augments rather than replaces the original call.

First desugars the body (string concatenation, record methods).

Calls on the object dispatch to the implementation (CallGraphBuilder), loading the captured values back from the receiver - so they stay with their object under context sensitivity.