Package qilin.core.invokedynamic
Class LambdaMetafactoryModel
java.lang.Object
qilin.core.invokedynamic.LambdaMetafactoryModel
- All Implemented Interfaces:
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.
-
Constructor Summary
ConstructorsConstructorDescriptionLambdaMetafactoryModel(PTAScene ptaScene, PAG pag, DynamicInvokeResolver resolver) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidapply(SootMethod m) static FieldSignaturecaptureField(View view, FunctionalObject fo, int i) The synthetic field holding thei-th value captured forfo: declared by the functional interface, named after the implementation so different lambdas keep their captures apart.
-
Constructor Details
-
LambdaMetafactoryModel
-
-
Method Details
-
captureField
The synthetic field holding thei-th value captured forfo: declared by the functional interface, named after the implementation so different lambdas keep their captures apart. -
appliesTo
- Specified by:
appliesToin interfaceMethodEffectModel
-
apply
- Specified by:
applyin interfaceMethodEffectModel
-