Libraryless. Click here for Pure Java version (5226L/29K).
static Method findMethod_precise_onTypes(O o, S method, Class... argTypes) 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_onTypes(m, argTypes); print ifdef preciseCall_debug("Method score: " + m + " " + score); if (score < Int.MAX_VALUE) best.put(m, score); } ret best!; } if (o == null) null; _MethodCache cache = callOpt_getCache(o.getClass()); L<Method> methods = cache.cache.get(method); new Lowest<Method> best; if (methods != null) for (Method m : methods) { int score = methodApplicabilityScore_onTypes(m, argTypes); if (score < Int.MAX_VALUE) best.put(m, score); } ret best!; }
Began life as a copy of #1020645
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: | #1020934 |
| Snippet name: | findMethod_precise_onTypes - better method resolution |
| Eternal ID of this version: | #1020934/6 |
| Text MD5: | c3d4328fd069afcf5d83674b33aa7bd8 |
| Transpilation MD5: | 2b11558d1f97a374a5317aab07c423dc |
| 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:32:21 |
| Source code size: | 915 bytes / 26 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 679 / 756 |
| Version history: | 5 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1028400 - findMethods_precise_onTypes - better method resolution #1034310 - findConstructor_precise_onTypes #1034312 - findNonStaticMethod_precise_onTypes - better method resolution #1035463 - findMethod_withPrimitiveWidening_onTypes - even better method resolution |