1 | static Set allEmbeddingObjects(O o) { |
2 | Set set = identityHashSet(); |
3 | allEmbeddingObjects_get(o, set); |
4 | ret set; |
5 | } |
6 | |
7 | svoid allEmbeddingObjects_get(O o, Set set) { |
8 | if (!set.add(o)) ret; |
9 | new Matches m; |
10 | for (S field : allFields(o)) |
11 | if (startsWith(field, "this$", m) && isInteger(m.rest())) |
12 | allEmbeddingObjects_get(get(o, field), set); |
13 | } |
Began life as a copy of #1015800
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: | #1015801 |
Snippet name: | allEmbeddingObjects |
Eternal ID of this version: | #1015801/3 |
Text MD5: | f77903fa662bd0662f0d45537bbddf9f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-27 22:20:47 |
Source code size: | 362 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 417 / 435 |
Version history: | 2 change(s) |
Referenced in: | [show references] |