1 | sclass DynModuleRef { |
2 | S moduleID; |
3 | transient O module; |
4 | |
5 | *() {} |
6 | *(S *moduleID) {} |
7 | |
8 | void _doneLoading() { |
9 | resolve(); |
10 | } |
11 | |
12 | void resolve { |
13 | if (module == null && moduleID != null) { |
14 | module = dm_getModule(moduleID); |
15 | //print("Module ID " + moduleID + " resolved to " + className(module)); |
16 | } |
17 | } |
18 | |
19 | O get() { |
20 | resolve(); |
21 | ret module; |
22 | } |
23 | |
24 | void set(S moduleID) { |
25 | this.moduleID = moduleID; |
26 | module = null; |
27 | } |
28 | |
29 | toString { |
30 | ret moduleID == null ? "-" : moduleID + " (" + shortClassName(module) + ")"; |
31 | } |
32 | |
33 | public int hashCode() { ret _hashCode(moduleID); } |
34 | public bool equals(O o) { ret o instanceof DynModuleRef && eq(moduleID, o/DynModuleRef.moduleID); } |
35 | } |
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: | #1015960 |
Snippet name: | DynModuleRef |
Eternal ID of this version: | #1015960/8 |
Text MD5: | 671ff6fbaa92895f2de0337d00a77b1a |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-06-03 13:32:29 |
Source code size: | 754 bytes / 35 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 502 / 1065 |
Version history: | 7 change(s) |
Referenced in: | [show references] |