Libraryless. Click here for Pure Java version (3404L/19K).
1 | svoid tok_typeAO(L<S> tok, Set<S> pairClasses) {
|
2 | int n = l(tok)-6; |
3 | bool change = false; |
4 | for (int i = 1; i < n; i += 2) {
|
5 | if (!eq(get(tok, i+2), "<")) continue; |
6 | S t = tok.get(i); |
7 | continue unless contains(pairClasses, t); |
8 | if (tok_isSingleTypeArg(tok, i+2)) {
|
9 | int j = findEndOfTypeArgs(tok, i+2)-1; |
10 | S type = joinSubList(tok, i+4, j); |
11 | replaceTokens_reTok(tok, i+4, j, type + ", Object"); |
12 | change = true; |
13 | } |
14 | } |
15 | } |
Began life as a copy of #1017378
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
| Snippet ID: | #1031870 |
| Snippet name: | tok_typeAO - have second type parameter default to Object |
| Eternal ID of this version: | #1031870/1 |
| Text MD5: | ce5c4076c93e8cc6ec4f1856694dd48e |
| Transpilation MD5: | f8a9e49ebe6c1c68f2500ded84b6d090 |
| Author: | stefan |
| Category: | javax / transpilation |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-07-23 16:02:51 |
| Source code size: | 472 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 402 / 531 |
| Referenced in: | [show references] |