Package sootup.callgraph.invokedynamic
Interface DynamicInvokeResolver
- All Known Implementing Classes:
BootstrapMethodHandleResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Decides which methods an invokedynamic call site transfers control to. Shared by CHA, RTA, Spark
and Qilin (configured via
CallGraphConfigBuilder.dynamicInvokeResolver(...)), so all
algorithms agree on which lambda bodies / method references are reachable.
Edges to the returned targets are attributed to the invokedynamic statement itself, not to the
later functional-interface call site. Pointer analyses bind the call site's arguments (the
captured values) as DynamicInvokeTarget.captureParameterIndex(int) says; no return value
flows back, since the invokedynamic produces the functional object, not the target's result.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull DynamicInvokeResolverEvery method referenced by aMethodHandlebootstrap argument is a target, e.g. the synthetic lambda body passed toLambdaMetafactory.default booleanisNone()Whether this resolver isnone().static @NonNull DynamicInvokeResolvernone()Resolves nothing: invokedynamic call sites get no call targets.@NonNull List<DynamicInvokeTarget>resolve(@NonNull JDynamicInvokeExpr expr)
-
Method Details
-
resolve
- Parameters:
expr- the invokedynamic expression- Returns:
- the methods
exprmay transfer control to; empty if unresolved
-
none
Resolves nothing: invokedynamic call sites get no call targets. -
bootstrapMethodHandles
Every method referenced by aMethodHandlebootstrap argument is a target, e.g. the synthetic lambda body passed toLambdaMetafactory. The default everywhere. -
isNone
default boolean isNone()Whether this resolver isnone().
-