1 | static Map<Class, Field[]> getDeclaredFields_cache = newDangerousWeakHashMap(); |
2 | |
3 | static Field[] getDeclaredFields_cached(Class c) { |
4 | Field[] fields; |
5 | synchronized(getDeclaredFields_cache) { |
6 | fields = getDeclaredFields_cache.get(c); |
7 | if (fields == null) { |
8 | getDeclaredFields_cache.put(c, fields = c.getDeclaredFields()); |
9 | for (Field f : fields) |
10 | makeAccessible(f); |
11 | } |
12 | } |
13 | ret fields; |
14 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005587 |
Snippet name: | getDeclaredFields_cached - also calls setAccessible(true) on all fields |
Eternal ID of this version: | #1005587/4 |
Text MD5: | 12d22903828126a88d3f934da534ef01 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-31 14:01:20 |
Source code size: | 427 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 744 / 984 |
Version history: | 3 change(s) |
Referenced in: | [show references] |