Libraryless. Click here for Pure Java version (3011L/17K).
1 | static Map<Class, Set<S>> allFields_cache = weakHashMap(); |
2 | |
3 | static Set<S> allFields(O o) { |
4 | if (o == null) ret emptySet(); |
5 | Class _c = _getClass(o); |
6 | Set<S> fields = allFields_cache.get(_c); |
7 | if (fields == null) |
8 | allFields_cache.put(_c, fields = asTreeSet(keys(getOpt_getFieldMap(o)))); |
9 | return fields; |
10 | } |
Began life as a copy of #1001123
download show line numbers debug dex old transpilations
Travelled to 18 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, veepotesqksf, vouqrxazstgt, whxojlpjdney, wtqryiryparv
No comments. add comment
Snippet ID: | #1005271 |
Snippet name: | allFields - get field names including base classes. sorted by name |
Eternal ID of this version: | #1005271/6 |
Text MD5: | 70529060f494b96031fef4f6ae3fd313 |
Transpilation MD5: | fc7b988f5703ecaedb83138b26c4d489 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-07-10 16:07:37 |
Source code size: | 321 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 669 / 1021 |
Version history: | 5 change(s) |
Referenced in: | [show references] |