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

12
LINES

< > BotCompany Repo | #1025413 // nonStaticNonTransientFieldObjects

JavaX fragment (include)

static L<Field> nonStaticNonTransientFieldObjects(O o) {
  if (o == null) null;
  new L<Field> fields;
  Class _c = _getClass(o);
  do {
    for (Field f : _c.getDeclaredFields())
      if ((f.getModifiers() & (Modifier.STATIC | Modifier.TRANSIENT)) == 0)
        fields.add(makeAccessible(f));
    _c = _c.getSuperclass();
  } while (_c != null);
  return fields;
}

Author comment

Began life as a copy of #1025410

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025413
Snippet name: nonStaticNonTransientFieldObjects
Eternal ID of this version: #1025413/1
Text MD5: ff21363feea46fbcd1f9d7efbb2007db
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-28 18:42:54
Source code size: 377 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 319 / 342
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1029604 - nonStaticNonTransientFieldObjectsOfType
#1031066 - nonStaticNonTransientFieldObjects_cachedArray