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

12
LINES

< > BotCompany Repo | #1031479 // addByteCodePathToClassLoader (jar or directory)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3858L/22K).

1  
sbool addByteCodePathToClassLoader(ClassLoader cl, File bytecode, S libraryID default null) ctex {
2  
  // new method signature
3  
  Bool b = cast callOpt(cl, "addFile", bytecode, libraryID);
4  
  
5  
  if (b == null)
6  
    // legacy method signature
7  
    b = isTrue(call(cl, "addFile", bytecode));
8  
    
9  
  if (b) print("Added byte code path " + bytecode + " to " + cl
10  
    + appendBracketed(libraryID));
11  
  ret b;
12  
}

Author comment

Began life as a copy of #1031281

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031479
Snippet name: addByteCodePathToClassLoader (jar or directory)
Eternal ID of this version: #1031479/9
Text MD5: 175e412ac8e0303d717d70f2d161f079
Transpilation MD5: b5e0e63831339c52178884dce5b82c96
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-06 01:14:05
Source code size: 411 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 190 / 283
Version history: 8 change(s)
Referenced in: [show references]