Class ClassHierarchyMethodTargetSelector

    • Constructor Detail

      • ClassHierarchyMethodTargetSelector

        public ClassHierarchyMethodTargetSelector​(IClassHierarchy cha)
        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 Detail

      • getCalleeTarget

        public IMethod getCalleeTarget​(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.
        Specified by:
        getCalleeTarget in interface MethodTargetSelector
        Parameters:
        caller - the GCNode in the call graph containing the call
        call - the call site reference of the call site
        receiver - the type of the target object or null
        Returns:
        the method to be called.
        Throws:
        IllegalArgumentException - if call is null
      • mightReturnSyntheticMethod

        public boolean mightReturnSyntheticMethod​(CGNode caller,
                                                  CallSiteReference site)
      • mightReturnSyntheticMethod

        public boolean mightReturnSyntheticMethod​(MethodReference declaredTarget)