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

18
LINES

< > BotCompany Repo | #1009792 // Test allMainClasses (listing all "main" classes in VM) [OK]

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

Download Jar. Libraryless. Click here for Pure Java version (1974L/13K).

1  
!7
2  
3  
p {
4  
  L<Class> allMainClasses = allMainClasses();
5  
  if (allMainClasses == null) upgradeJavaX();
6  
  printStruct("All main classes: ", allMainClasses);
7  
  assertEquals(ll(mc()), allMainClasses);
8  
  Class mod = hotwire(#1001167);
9  
  allMainClasses = allMainClasses();
10  
  assertEquals(2, l(allMainClasses));
11  
  assertTrue(allMainClasses.contains(mc()));
12  
  assertTrue(allMainClasses.contains(mod));
13  
  mod = null; allMainClasses = null;
14  
  gc();
15  
  allMainClasses = allMainClasses();
16  
  assertEquals(ll(mc()), allMainClasses);
17  
  print("OK!");
18  
}

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: #1009792
Snippet name: Test allMainClasses (listing all "main" classes in VM) [OK]
Eternal ID of this version: #1009792/6
Text MD5: 597ff491bcde5cc6316a3f46ef341fd5
Transpilation MD5: f948f0f7e5c0b2659987f60badf163d6
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-17 02:48:07
Source code size: 550 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 474 / 1088
Version history: 5 change(s)
Referenced in: [show references]