Libraryless. Click here for Pure Java version (5264L/29K).
1 | sO callWithoutVarargs(O o, S methodName, O... args) ctex { |
2 | if (o == null) null; |
3 | |
4 | if (o instanceof Class) { |
5 | Class c = (Class) o; |
6 | _MethodCache cache = callOpt_getCache(c); |
7 | |
8 | Method me = cache.findStaticMethod(methodName, args); |
9 | if (me != null) |
10 | ret invokeMethod(me, null, args); |
11 | |
12 | fail("Method " + c.getName() + "." + methodName + "(" + joinWithComma(classNames(args)) + ") not found"); |
13 | } else { |
14 | Class c = o.getClass(); |
15 | _MethodCache cache = callOpt_getCache(c); |
16 | |
17 | Method me = cache.findMethod(methodName, args); |
18 | if (me != null) |
19 | ret invokeMethod(me, o, args); |
20 | |
21 | fail("Method " + c.getName() + "." + methodName + "(" + joinWithComma(classNames(args)) + ") not found"); |
22 | } |
23 | } |
Began life as a copy of #1022095
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034768 |
Snippet name: | callWithoutVarargs |
Eternal ID of this version: | #1034768/1 |
Text MD5: | 9fd59a287afc7535a0f5f55e3035fb5e |
Transpilation MD5: | 4949684b0d8886e450accb8cdf7496c5 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-08 06:48:15 |
Source code size: | 763 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 116 / 173 |
Referenced in: | [show references] |