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

10
LINES

< > BotCompany Repo | #1007938 // getOpt_findField - TODO: optimize

JavaX fragment (include)

1  
static Field getOpt_findField(Class<?> c, String field) {
2  
  Class _c = c;
3  
  do {
4  
    for (Field f : _c.getDeclaredFields())
5  
      if (f.getName().equals(field))
6  
        return f;
7  
    _c = _c.getSuperclass();
8  
  } while (_c != null);
9  
  ret null;
10  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 17 computer(s): aoiabmzegqzx, ayfdnjdhpjha, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, kltaiputbqfu, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, ppjhyzlbdabe, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1007938
Snippet name: getOpt_findField - TODO: optimize
Eternal ID of this version: #1007938/5
Text MD5: f2a0180e4cb85c3426f9fda672948fb0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-22 00:40:13
Source code size: 254 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 536 / 1149
Version history: 4 change(s)
Referenced in: [show references]