Libraryless. Click here for Pure Java version (2502L/16K).
1 | svoid dm_changeModuleLibID(O mod, S newLibID) { |
2 | O stem = dm_getStem(mod); |
3 | if (stem == null) ret; |
4 | LS l = splitAtSlash(newLibID); |
5 | if (l(l) != 2) fail("Not a valid lib ID: " + quote(newLibID)); |
6 | S moduleID = assertSnippetID(first(l)); |
7 | S _className = assertIdentifier(second(l)); |
8 | print("Morphing module " + dm_moduleIDAndName(stem) + " into type " + moduleID + "/" + _className); |
9 | call(stem, '_setFields, +moduleID, +_className); |
10 | dm_reloadModule(stem); |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1027651 |
Snippet name: | dm_changeModuleLibID [seems to work] |
Eternal ID of this version: | #1027651/3 |
Text MD5: | 0dba7e4cc7f249d632f536aa6029377c |
Transpilation MD5: | abaa52cfa75b3dc5acfd2c939118d987 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-03-29 13:52:20 |
Source code size: | 477 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 216 / 319 |
Version history: | 2 change(s) |
Referenced in: | [show references] |