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   

Travelled to 9 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

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: 180 / 179
Version history: 2 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1013088 & http://1013088.tinybrain.de