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

10
LINES

< > BotCompany Repo | #1006697 // nonAbstractClassesImplementing - same as myNonAbstractClassesImplementing except it finds classes through class loader

JavaX fragment (include)

// Note: this loads all classes declared in program
static <A> L<Class<? extends A>> nonAbstractClassesImplementing(Class<A> base) {
  L<Class<? extends A>> l = new L;
  for (S name : myClasses()) {
    Class c = _getClass(name);
    if (!isAbstract(c) && isSubtypeOf(c, base))
      l.add(c);
  }
  ret l;
}

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: #1006697
Snippet name: nonAbstractClassesImplementing - same as myNonAbstractClassesImplementing except it finds classes through class loader
Eternal ID of this version: #1006697/5
Text MD5: 6c02e8412f52047ab0e3860b1331eac4
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-29 00:32:04
Source code size: 317 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 464 / 486
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1006703 - myNonAbstractClassesImplementing - probably better than nonAbstractClassesImplementing (doesn't go through class loader's files)