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

13
LINES

< > BotCompany Repo | #1034906 // allMethods - finds all methods declared by class or superclasses (both static and non-static). methods are not made accessible

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (81L) is out of date.

static L<Method> allMethods(O o) {
  ret allMethods(_getClass(o));
}

static L<Method> allMethods(Class c) {
  new L<Method> l;
  while (c != null) {
    for (Method m : c.getDeclaredMethods())
      l.add(m);
    c = c.getSuperclass();
  }
  ret l;
}

Author comment

Began life as a copy of #1007855

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034906
Snippet name: allMethods - finds all methods declared by class or superclasses (both static and non-static). methods are not made accessible
Eternal ID of this version: #1034906/4
Text MD5: 6d8ab509f25e7a5119bf9766c1cbcdcb
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-14 17:56:17
Source code size: 263 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 54 / 90
Version history: 3 change(s)
Referenced in: [show references]