Class ClassHierarchyMethodTargetSelector
java.lang.Object
com.ibm.wala.ipa.callgraph.impl.ClassHierarchyMethodTargetSelector
- All Implemented Interfaces:
MethodTargetSelector
A
MethodTargetSelector
that simply looks up the declared type, name and descriptor of a
CallSiteReference
in the appropriate class hierarchy.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCalleeTarget
(CGNode caller, CallSiteReference call, IClass receiver) This target selector searches the class hierarchy for the method matching the signature of the call that is appropriate for the receiver type.boolean
-
Constructor Details
-
ClassHierarchyMethodTargetSelector
Initialization. The class hierarchy is needed for lookups and the warnings are used when the lookups fails (which should never happen).- Parameters:
cha
- The class hierarchy to use.
-
-
Method Details
-
getCalleeTarget
This target selector searches the class hierarchy for the method matching the signature of the call that is appropriate for the receiver type.- Specified by:
getCalleeTarget
in interfaceMethodTargetSelector
- Parameters:
caller
- the GCNode in the call graph containing the callcall
- the call site reference of the call sitereceiver
- the type of the target object or null- Returns:
- the method to be called.
- Throws:
IllegalArgumentException
- if call is null
-
mightReturnSyntheticMethod
public boolean mightReturnSyntheticMethod()
-