Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

18
LINES

< > BotCompany Repo | #1020645 // findMethod_precise - better method resolution

JavaX fragment (include)

static Method findMethod_precise(O o, S method, O... args) ctex {
  if (o cast Class) {
    _MethodCache cache = callOpt_getCache(o);
    L<Method> methods = cache.cache.get(method);
    new Lowest<Method> best;
    if (methods != null) for (Method m : methods) {
      continue unless isStaticMethod(m);
      int score = methodApplicabilityScore(m, args);
      if (score < Int.MAX_VALUE) {
        if (preciseCall_debug)
          print("Method score: " + m + " " + score);
        best.put(m, score);
      }
    }
    ret best!;
  } else
    throw todo();
}

Author comment

Began life as a copy of #1007856

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020645
Snippet name: findMethod_precise - better method resolution
Eternal ID of this version: #1020645/3
Text MD5: 681dcaba21fbeecb7d81db3ced7aabaf
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-30 12:14:50
Source code size: 581 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 228 / 259
Version history: 2 change(s)
Referenced in: [show references]