Libraryless. Click here for Pure Java version (3404L/19K).
svoid tok_typeAO(L<S> tok, Set<S> pairClasses) { int n = l(tok)-6; bool change = false; for (int i = 1; i < n; i += 2) { if (!eq(get(tok, i+2), "<")) continue; S t = tok.get(i); continue unless contains(pairClasses, t); if (tok_isSingleTypeArg(tok, i+2)) { int j = findEndOfTypeArgs(tok, i+2)-1; S type = joinSubList(tok, i+4, j); replaceTokens_reTok(tok, i+4, j, type + ", Object"); change = true; } } }
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: | 169 / 246 |
Referenced in: | [show references] |