1 | static <A> A jextractSerializedObject(S s, Class<A> c) {
|
2 | L<S> tok = javaTok(s); |
3 | int i = indexOf(tok, shortClassName(c)); |
4 | if (i < 0) null; |
5 | int j = i+1; |
6 | if (eq(get(tok, i+2), "("))
|
7 | j = findEndOfBracketPart(tok, i+2); |
8 | s = joinSubList(tok, i, j); |
9 | ifdef jextractSerializedObject_debug |
10 | print("ser >> " + s);
|
11 | endifdef |
12 | ret (A) unstruct(s); |
13 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1015341 |
| Snippet name: | jextractSerializedObject |
| Eternal ID of this version: | #1015341/4 |
| Text MD5: | 72b6d4004aa6737325a28f91fb2f98bb |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-05-13 01:15:20 |
| Source code size: | 369 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 593 / 647 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |