1 | static void printObjectLayout(O o) { |
2 | if (o instanceof Class) o = nu((Class) o); |
3 | print("Size of object " + className(o) + ": " + unsafe_sizeOf(o) + " bytes"); |
4 | for (Pair<S, Long> p : mapPairs(unsafe_allFieldOffsets(o))) |
5 | print(" Field " + p.a + " is at offset " + p.b); |
6 | print(); |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1012266 |
Snippet name: | printObjectLayout |
Eternal ID of this version: | #1012266/5 |
Text MD5: | 859fc9acf90c16f7e2b1c9575dd08deb |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-28 12:32:57 |
Source code size: | 296 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 524 / 579 |
Version history: | 4 change(s) |
Referenced in: | [show references] |