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

3
LINES

< > BotCompany Repo | #1002772 // hasField - does a class or an object have a certain field?

JavaX fragment (include)

static boolean hasField(Object o, String field) {
  ret findField2(o, field) != null;
}

Author comment

Began life as a copy of #1000891

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: #1002772
Snippet name: hasField - does a class or an object have a certain field?
Eternal ID of this version: #1002772/1
Text MD5: 89a98b68ab0216cca365ee4a975659b7
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-10-30 22:06:55
Source code size: 89 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 768 / 771
Referenced in: #1005305 - findField2 - goes to superclasses - uses getOpt's cache now for non-static fields
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1009246 - hasFieldNamed - synonym of hasField - does a class or an object have a certain field?
#1031355 - hasFieldWithSameName
#3000382 - Answer for ferdie (>> t = 1, f = 0)