Package sootup.callgraph
Class MethodLookup
java.lang.Object
sootup.callgraph.MethodLookup
JVM method lookup shared by all call graph / points-to algorithms: from a start class (declared
owner for resolution, receiver type for dispatch) find the method a sub-signature binds to.
Order: start class and superclasses, then maximally specific interface method (default
methods), then signature-polymorphic methods (SignaturePolymorphicMethods). May return an
abstract method (e.g. re-abstracted override); use findConcrete(sootup.core.types.ClassType, sootup.core.signatures.MethodSubSignature) for dispatch.
Not pluggable on purpose: JVM semantics, one right answer. Pluggable target models (reflection, invokedynamic) live elsewhere.
Cache: per (class, sub-signature), misses included; dropped when the type hierarchy modification count changes. One instance per analysis, holds the view strongly.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull Optional<SootMethod>find(@NonNull MethodSignature sig) Lookup starting at the declaring class ofsig.@NonNull Optional<SootMethod>find(@NonNull ClassType start, @NonNull MethodSubSignature subSig) Lookup starting atstart; may yield an abstract method.@NonNull Optional<SootMethod>findConcrete(@NonNull MethodSignature sig) Likefind(MethodSignature), abstract result mapped to empty.@NonNull Optional<SootMethod>findConcrete(@NonNull ClassType start, @NonNull MethodSubSignature subSig) Likefind(ClassType, MethodSubSignature), abstract result mapped to empty.@NonNull ViewgetView()
-
Constructor Details
-
MethodLookup
-
-
Method Details
-
getView
-
find
Lookup starting at the declaring class ofsig. -
find
public @NonNull Optional<SootMethod> find(@NonNull ClassType start, @NonNull MethodSubSignature subSig) Lookup starting atstart; may yield an abstract method. Cached. -
findConcrete
public @NonNull Optional<SootMethod> findConcrete(@NonNull ClassType start, @NonNull MethodSubSignature subSig) Likefind(ClassType, MethodSubSignature), abstract result mapped to empty. -
findConcrete
Likefind(MethodSignature), abstract result mapped to empty.
-