Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

20
LINES

< > BotCompany Repo | #1008731 // Test live-wiring (extending main program's class loader at runtime) [WORKS!]

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (2895L/20K/66K).

1  
!7
2  
3  
sS extensionCode = [[
4  
  svoid function {}
5  
  sclass ext {
6  
    svoid yo {
7  
      print("Yo!");
8  
      function();
9  
    }
10  
  }
11  
]];
12  
13  
p {
14  
  liveWire(extensionCode);
15  
  call(getClass("main$ext"), "yo");
16  
}
17  
18  
svoid function {
19  
  print("I'm here");
20  
}

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: #1008731
Snippet name: Test live-wiring (extending main program's class loader at runtime) [WORKS!]
Eternal ID of this version: #1008731/7
Text MD5: d1e073408578c2e2664f514f11277093
Transpilation MD5: 461a1ba42b500392f9ab277f3bdc2735
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-31 01:35:21
Source code size: 257 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 534 / 672
Version history: 6 change(s)
Referenced in: [show references]