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

15
LINES

< > BotCompany Repo | #1034312 // findNonStaticMethod_precise_onTypes - better method resolution

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5215L/29K).

static Method findNonStaticMethod_precise_onTypes(O o, S method, Class... argTypes) ctex {
  Class c = _getClass(o);
  if (c == null) null;
  _MethodCache cache = callOpt_getCache(c);
  L<Method> methods = cache.cache.get(method);
  new Lowest<Method> best;
  if (methods != null) for (Method m : methods) {
    continue if isStaticMethod(m);
    int score = methodApplicabilityScore_onTypes(m, argTypes);
    print ifdef preciseCall_debug("Method score: " + m + " " + score);
    if (score < Int.MAX_VALUE)
      best.put(m, score);
  }
  ret best!;
}

Author comment

Began life as a copy of #1020934

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034312
Snippet name: findNonStaticMethod_precise_onTypes - better method resolution
Eternal ID of this version: #1034312/4
Text MD5: b616f06b64c8510b0c412ac87bf2609c
Transpilation MD5: 03821dd7bcb2f3805cf9a275768644b2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-01 20:35:41
Source code size: 568 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 167 / 251
Version history: 3 change(s)
Referenced in: [show references]