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

7
LINES

< > BotCompany Repo | #1033457 // getBytecodePathForClass

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

Libraryless. Click here for Pure Java version (4527L/25K).

static File getBytecodePathForClass(O o) {
  ret getBytecodePathForClass(_getClass(o));
}

static File getBytecodePathForClass(Class c) ctex {
  ret c == null ?: new File(c.getProtectionDomain().getCodeSource().getLocation().toURI());
}

Author comment

Began life as a copy of #1016754

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033457
Snippet name: getBytecodePathForClass
Eternal ID of this version: #1033457/2
Text MD5: 884142e9574a5ff7f8d0f27650c23ba9
Transpilation MD5: 793c1c1d05fa98cbaa9e68bd4c1939a3
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-11-01 23:26:20
Source code size: 242 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 221 / 322
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)