1 | static S singleFieldName(Class c) {
|
2 | Set<S> l = listFields(c); |
3 | if (l(l) != 1) |
4 | fail("No single field found in " + c + " (have " + n(l(l), "fields") + ")");
|
5 | ret first(l); |
6 | } |
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: | #1005326 |
| Snippet name: | singleFieldName - find name of the single defined field in class (not going to superclasses) or fail |
| Eternal ID of this version: | #1005326/1 |
| Text MD5: | 110cb71319818bfcb6073401bfb842e0 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-11-05 18:46:38 |
| Source code size: | 184 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 762 / 787 |
| Referenced in: | [show references] |