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).

!7

sS extensionCode = [[
  svoid function {}
  sclass ext {
    svoid yo {
      print("Yo!");
      function();
    }
  }
]];

p {
  liveWire(extensionCode);
  call(getClass("main$ext"), "yo");
}

svoid function {
  print("I'm here");
}

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: 533 / 670
Version history: 6 change(s)
Referenced in: #1008733 - Test if live-wiring overwrites existing classes (it doesn't)
#1008735 - Test live-wiring auto-including original source [WORKS]