public static Set<XMethod> resolveMethodCallTargets(ReferenceType receiverType, InvokeInstruction invokeInstruction,
            ConstantPoolGen cpg, boolean receiverTypeIsExact) throws ClassNotFoundException {

        if (invokeInstruction.getOpcode() == Const.INVOKESTATIC) {
            throw new IllegalArgumentException();
        }

        String methodName = invokeInstruction.getName(cpg);
        String methodSig = invokeInstruction.getSignature(cpg);

        // Array method calls aren't virtual.
        // They should just resolve to Object methods.
        if (receiverType instanceof ArrayType) {
            try {
                return Util.emptyOrNonnullSingleton(getXClass(objectDescriptor).findMethod(methodName, methodSig, false));
            } catch (CheckedAnalysisException e) {
                return Collections.<XMethod> emptySet();
            }
        }

        if (receiverType instanceof ObjectType) {
            // Get the receiver class.
            String receiverClassName = ((ObjectType) receiverType).getClassName();

            return resolveVirtualMethodCallTargets(receiverClassName, methodName, methodSig, receiverTypeIsExact,
                    invokeInstruction instanceof INVOKESPECIAL);
        }
        assert receiverType instanceof NullType;
        return Collections.<XMethod> emptySet();

    }
public static Set < XMethod > resolveMethodCallTargets ( ReferenceType receiverType , InvokeInstruction invokeInstruction , ConstantPoolGen cpg , boolean receiverTypeIsExact ) throws ClassNotFoundException { if ( invokeInstruction . getOpcode ( ) == Const . INVOKESTATIC ) { throw new IllegalArgumentException ( ) ; } String methodName = invokeInstruction . getName ( cpg ) ; String methodSig = invokeInstruction . getSignature ( cpg ) ; if ( receiverType instanceof ArrayType ) { try { return Util . emptyOrNonnullSingleton ( getXClass ( objectDescriptor ) . findMethod ( methodName , methodSig , false ) ) ; } catch ( CheckedAnalysisException e ) { return Collections . < XMethod > emptySet ( ) ; } } if ( receiverType instanceof ObjectType ) { String receiverClassName = ( ( ObjectType ) receiverType ) . getClassName ( ) ; return resolveVirtualMethodCallTargets ( receiverClassName , methodName , methodSig , receiverTypeIsExact , invokeInstruction instanceof INVOKESPECIAL ) ; } assert receiverType instanceof NullType ; return Collections . < XMethod > emptySet ( ) ; }
Resolve possible instance method call targets.

@param receiverType
type of the receiver object
@param invokeInstruction
the InvokeInstruction
@param cpg
the ConstantPoolGen
@param receiverTypeIsExact
if true, the receiver type is known exactly, which should
allow a precise result
@return Set of methods which might be called
@throws ClassNotFoundException