Libraryless. Click here for Pure Java version (5215L/29K).
1 | static Method findNonStaticMethod_precise_onTypes(O o, S method, Class... argTypes) ctex {
|
2 | Class c = _getClass(o); |
3 | if (c == null) null; |
4 | _MethodCache cache = callOpt_getCache(c); |
5 | L<Method> methods = cache.cache.get(method); |
6 | new Lowest<Method> best; |
7 | if (methods != null) for (Method m : methods) {
|
8 | continue if isStaticMethod(m); |
9 | int score = methodApplicabilityScore_onTypes(m, argTypes); |
10 | print ifdef preciseCall_debug("Method score: " + m + " " + score);
|
11 | if (score < Int.MAX_VALUE) |
12 | best.put(m, score); |
13 | } |
14 | ret best!; |
15 | } |
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: | 384 / 517 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |