Libraryless. Click here for Pure Java version (2823L/18K).
1 | static <A> A nuLike proxy_importResults(Class<A> intrface, final O target) { |
2 | if (target == null) null; |
3 | if (isInstance(intrface, target)) ret (A) target; |
4 | ret (A) java.lang.reflect.Proxy.newProxyInstance(intrface.getClassLoader(), |
5 | new Class[] { intrface }, |
6 | new InvocationHandler { |
7 | public O invoke(O proxy, Method method, O[] args) { |
8 | ret quickImport(call(target, method.getName(), unnull(args))); |
9 | } |
10 | }); |
11 | } |
12 | |
13 | static <A> A proxy_importResults(O target, Class<A> intrface) { |
14 | ret proxy_importResults(intrface, target); |
15 | } |
Began life as a copy of #1003492
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1029148 |
Snippet name: | proxy_importResults - proxy + quickImport method results |
Eternal ID of this version: | #1029148/1 |
Text MD5: | b87c2c3e4106e32ead4eb03399cebb75 |
Transpilation MD5: | d1ae9320950dabb72d463c23f1aac666 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-22 01:09:55 |
Source code size: | 559 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 215 / 311 |
Referenced in: | [show references] |