Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1013088 // allFieldObjects - get field objects including base classes

JavaX fragment (include)

static L<Field> allFieldObjects(O o) {
  new L<Field> fields;
  Class _c = _getClass(o);
  do {
    for (Field f : _c.getDeclaredFields()) {
      f.setAccessible(true);
      fields.add(f);
    }
    _c = _c.getSuperclass();
  } while (_c != null);
  return fields;
}

Author comment

Began life as a copy of #1005271

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1013088
Snippet name: allFieldObjects - get field objects including base classes
Eternal ID of this version: #1013088/3
Text MD5: 32a3a6139e989df55f2f5c89f15c6f8f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-25 03:50:20
Source code size: 279 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 425 / 455
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1018910 - nonStaticFieldObjects
#1027119 - allFieldObjectsNamed
#1033883 - allFieldObjects_dontMakeAccessible - get field objects including base classes