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)

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

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: 463 / 486
Version history: 4 change(s)
Referenced in: [show references]