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

18
LINES

< > BotCompany Repo | #1021526 // findMethod_cached

JavaX fragment (include)

static Method findMethod_cached(O o, S method, O... args) ctex {
  if (o == null) null;
  if (o cast Class) {
    _MethodCache cache = callOpt_getCache(o);
    L<Method> methods = cache.cache.get(method);
    if (methods != null) for (Method m : methods)
      if (isStaticMethod(m) && findMethod_checkArgs(m, args, false))
        ret m;
    null;
  } else {
    _MethodCache cache = callOpt_getCache(o.getClass());
    L<Method> methods = cache.cache.get(method);
    if (methods != null) for (Method m : methods)
      if (findMethod_checkArgs(m, args, false))
        ret m;
    null;
  }
}

Author comment

Began life as a copy of #1020645

download  show line numbers  debug dex  old transpilations   

Travelled to 24 computer(s): ayivmpnvhhik, bhatertpkbcr, cfunsshuasjs, cvvynrlkszfz, dpqxeycirhfy, ekrmjmnbrukm, ishqpsrjomds, jcllbfdqhrgy, lnbujpyubztb, mqqgnosmbjvj, mqsvbyillbrs, ofpaelxlmzfo, omdjrrnzbjjv, onxytkatvevr, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, snaazhdonpnp, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xfddqsrefgvo, xrpafgyirdlv, yanjaxplzisb

No comments. add comment

Snippet ID: #1021526
Snippet name: findMethod_cached
Eternal ID of this version: #1021526/3
Text MD5: 8e20097c090a44befc45b497beeb7b6e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-16 20:56:33
Source code size: 613 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 384 / 4349
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)