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

18
LINES

< > BotCompany Repo | #1016501 // allLiveMethods_skipOverridden_sortByNameWithinClass

JavaX fragment (include)

static L<Method> allLiveMethods_skipOverridden_sortByNameWithinClass(O o) {
  Class c = _getClass(o);
  bool isInstance = c != o;
  new L<Method> methods;
  Set<Pair<S, L<Class>>> seenSignatures = new HashSet;
  while (c != null) {
    new L<Method> newMethods;
    for (Method m : c.getDeclaredMethods())
      if (isInstance != isStaticMethod(m)) {
        Pair<S, L<Class>> sig = pair(m.getName(), methodArgumentTypes(m));
        if (seenSignatures.add(sig))
          newMethods.add(m);
      }
    addAll(methods, sortMethodsByNameIC(newMethods));
    c = c.getSuperclass();
  }
  ret methods;
}

Author comment

Began life as a copy of #1016499

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016501
Snippet name: allLiveMethods_skipOverridden_sortByNameWithinClass
Eternal ID of this version: #1016501/1
Text MD5: 221e434160919b8d5f82b013414401e3
Author: stefan
Category: javax / introspection
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-20 17:00:30
Source code size: 618 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 375 / 395
Referenced in: [show references]