1 | static SS tok_toNonPrimitiveTypes_map = mapFromTokens([[ |
2 | int Int |
3 | byte Byte |
4 | float Float |
5 | short Short |
6 | double Double |
7 | long Long |
8 | char Character |
9 | bool Bool |
10 | boolean Bool |
11 | ]]); |
12 | |
13 | sS tok_toNonPrimitiveTypes(S s) { |
14 | ret join(tok_toNonPrimitiveTypes(javaTok(s))); |
15 | } |
16 | |
17 | static L<S> tok_toNonPrimitiveTypes(L<S> tok) { |
18 | for (int i = 1; i < l(tok); i += 2) { |
19 | S t = tok.get(i); |
20 | t = tok_toNonPrimitiveTypes_map.get(t); |
21 | if (t != null && neq(get(tok, i+2), "[")) tok.set(i, t); |
22 | } |
23 | ret tok; |
24 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1015548 |
Snippet name: | tok_toNonPrimitiveTypes - convert to boxed type |
Eternal ID of this version: | #1015548/6 |
Text MD5: | 880baec25a07808320067b616330f5e3 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-06-29 04:56:36 |
Source code size: | 525 bytes / 24 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 472 / 517 |
Version history: | 5 change(s) |
Referenced in: | [show references] |