Class CrossLanguageMethodTargetSelector
java.lang.Object
com.ibm.wala.cast.ipa.callgraph.CrossLanguageMethodTargetSelector
- All Implemented Interfaces:
MethodTargetSelector
A MethodTargetSelector implementation that supports multiple languages. It works by delegating to
a language-specific child selector based on the language associated with the MethodReference for
which a target is being chosen.
This provides a simple way to combine language-specific target selection policies---such as those used for constructor calls in JavaScript and for bean methods in J2EE.
- Author:
- Julian Dolby (dolby@us.ibm.com)
-
Constructor Summary
ConstructorDescriptionCrossLanguageMethodTargetSelector
(Map<Atom, MethodTargetSelector> languageSelectors) -
Method Summary
Modifier and TypeMethodDescriptiongetCalleeTarget
(CGNode caller, CallSiteReference site, IClass receiver) Given a calling node, a call site and (optionally) a dispatch type, return the target method to be called.
-
Constructor Details
-
CrossLanguageMethodTargetSelector
-
-
Method Details
-
getCalleeTarget
Description copied from interface:MethodTargetSelector
Given a calling node, a call site and (optionally) a dispatch type, return the target method to be called.- Specified by:
getCalleeTarget
in interfaceMethodTargetSelector
- Parameters:
caller
- the GCNode in the call graph containing the callsite
- the call site reference of the call sitereceiver
- the type of the target object or null- Returns:
- the method to be called.
-