Download Jar. Libraryless. Click here for Pure Java version (878L/6K).
1 | !7 |
2 | |
3 | p { |
4 | assertEquals("main", currentFunctionName()); |
5 | test(); |
6 | print("OK"); |
7 | } |
8 | |
9 | svoid test { |
10 | assertEquals("test", currentFunctionName()); |
11 | } |
12 | |
13 | sS currentFunctionName() { |
14 | ret new Throwable().getStackTrace()[1].getMethodName(); |
15 | } |
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: | #1012134 |
Snippet name: | Test getting current function's name from stack trace (OK) |
Eternal ID of this version: | #1012134/4 |
Text MD5: | 20ea9069ecd5f09caf2fd5b03111fe30 |
Transpilation MD5: | 41e6884d2a113c416d7dcdc3bf2bb692 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-21 10:02:24 |
Source code size: | 246 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 430 / 1025 |
Version history: | 3 change(s) |
Referenced in: | [show references] |