Libraryless. Click here for Pure Java version (2739L/16K).
1 | sS checkForRedeclaredFields(O o) { |
2 | new Map<S, Field> map; |
3 | fOr (Field f : nonStaticFieldObjects(o)) { |
4 | Field f2 = map.put(f.getName(), f); |
5 | if (f2 != null) |
6 | ret "Field redeclared (not good): " + f + " / " + f2; |
7 | } |
8 | null; |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031048 |
Snippet name: | checkForRedeclaredFields - return error message if class has two fields of same name (bad for persistence and reflection) |
Eternal ID of this version: | #1031048/3 |
Text MD5: | 5f9a3add61462466ef74ecd587f0c5f9 |
Transpilation MD5: | 8deb6b999229d3e85fe6f71ef68cdb51 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-04-25 23:11:04 |
Source code size: | 246 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 205 / 294 |
Version history: | 2 change(s) |
Referenced in: | [show references] |