static void printObjectLayout(O o) { if (o instanceof Class) o = nu((Class) o); print("Size of object " + className(o) + ": " + unsafe_sizeOf(o) + " bytes"); for (Pair<S, Long> p : mapPairs(unsafe_allFieldOffsets(o))) print(" Field " + p.a + " is at offset " + p.b); print(); }
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: | 525 / 579 |
Version history: | 4 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1012316 - renderObjectLayout - show an object's VM-internal layout in multiple lines |