×

Apparatus and method for a runtime method overloading resolver

  • US 6,415,434 B1
  • Filed: 06/18/1999
  • Issued: 07/02/2002
  • Est. Priority Date: 06/18/1999
  • Status: Expired due to Fees
First Claim
Patent Images

1. An apparatus for resolving method overloading at runtime, comprising:

  • a. a number of computer readable media; and

    b. computer readable program code stored on said number of computer readable media, said computer readable program code for resolving a target method, wherein said target method comprises at least one parameter, said program code comprising;

    i. program code for accessing an application programming interface file comprising a number of methods overloaded with said target method; and

    ii. program code for selecting one of said number of methods, said code for selecting comprising;

    (1) program code for selecting an exact method, wherein a data type of each of said at least one parameter of said exact method is the same data type of a corresponding said at least one parameter of said target method;

    (2) program code for determining that if there is no exact method, then a best method is to be selected; and

    (3) program code for selecting said best method, said code for selecting said best method comprising;

    a. program code for selecting a number of candidate methods from said number of methods, and wherein a data type of each of said at least one parameter of said target method can be assigned to a data type of a corresponding said at least one parameter of each of said number of candidate methods;

    b. program code for scoring each of said number of candidate methods wherein said program code for scoring each of said number of candidate methods comprises program code for determining if a first candidate method can be assigned to a second candidate method, said code for determining comprising;



    I. program code for determining if a data type of a given one of said at least one parameter of said first candidate method can be assigned to a data type of a corresponding said at least one parameter of said second candidate method parameter; and



    II. program code for assigning a point if a data type of each of said at least one parameter of said first candidate method can be assigned to a data type of a corresponding said at least one parameter of said second candidate method; and

    c. said code for selecting said best method further comprising program code for selecting one of said number of candidate methods having the best score, wherein said one of said number of candidate methods having the best score comprises said best method.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×