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

8
LINES

< > BotCompany Repo | #1001123 // listFields

JavaX fragment (include)

// This is for main classes that are all static.
// (We don't go to base classes.)
static Set<S> listFields(O c) {
  new TreeSet<S> fields;
  for (Field f : _getClass(c).getDeclaredFields())
    fields.add(f.getName());
  return fields;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, qsqiayxyrbia, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1001123
Snippet name: listFields
Eternal ID of this version: #1001123/1
Text MD5: a2444b338de3ba339bc872f135df3bcc
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-10-26 16:50:14
Source code size: 245 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 623 / 1072
Referenced in: #1002427 - Accellerating 629 (SPIKE)
#1003131 - fields - synonym of listFields. Does NOT go to base classes!!
#1005271 - allFields - get field names including base classes. sorted by name
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#3000382 - Answer for ferdie (>> t = 1, f = 0)