1 | static Map getMountedObjects(O mounted) { |
2 | if (mounted == null) null; |
3 | Map generalMap = vm_generalMap(); |
4 | if (generalMap == null) fail("Please upgrade JavaX"); |
5 | synchronized(generalMap) { |
6 | Map map = cast generalMap.get("mounts"); |
7 | if (map == null) { |
8 | pcall-short { |
9 | map = (Map) nuForeignObject(javax(), className(javax()) + '$WeakIdentityHashMap); |
10 | } |
11 | if (map == null) map = new WeakIdentityHashMap; // older JavaX |
12 | generalMap.put("mounts", map); |
13 | } |
14 | Map m = cast map.get(mounted); |
15 | ret m == null ? new HashMap : new HashMap(m); |
16 | } |
17 | } |
Began life as a copy of #1010614
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: | #1010615 |
Snippet name: | getMountedObjects - always returns a Map |
Eternal ID of this version: | #1010615/5 |
Text MD5: | 2612974c38259cdacbad764b9c05d85b |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-23 05:19:58 |
Source code size: | 596 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 417 / 438 |
Version history: | 4 change(s) |
Referenced in: | [show references] |