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

18
LINES

< > BotCompany Repo | #1031795 // stefansOS_snippetIDToModuleLibIDs

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

static Cl<S> stefansOS_snippetIDToModuleLibIDs(S _snippetID, Class c default hotwireModule(_snippetID)) {
  snippetID = fsI(_snippetID);
  L<S> names = (L) callOpt(c, 'myInnerClasses);
  if (names == null)
    names = nonNulls(map getClassDeclarationName(innerClassesOfMain(getServerTranspiledWithoutLibs(snippetID))));
    
  print(+names);
  // only show the usable ones
  try {
    print(mcName := mainClassNameForClassLoader(c.getClassLoader()));
    names = shortClassNames(nonAbstractClassesInRealmWithSuperclassShortNamed(c, "DynModule", names));
    print(+names);
  } catch print e {
    names = null;
  }
  
  ret map(names, name -> joinWithSlash(snippetID, name));
}

Author comment

Began life as a copy of #1016593

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031795
Snippet name: stefansOS_snippetIDToModuleLibIDs
Eternal ID of this version: #1031795/5
Text MD5: 6878268025969efff4aec6cec3a285a2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-30 02:37:14
Source code size: 694 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 72 / 110
Version history: 4 change(s)
Referenced in: [show references]