// takes ~70 ms to set up, do it only once if possible sclass ClassNameResolver { File byteCodePath = byteCodePathForClass(getClass()); LS importedPackages = itemPlusList("java.lang", endingWith_dropSuffix(standardImports(), ".*")); simplyCached Set allFullyQualifiedClassNames() { new Set set; set.addAll(classNamesInJarOrDir(byteCodePath)); set.addAll(classNamesInLoadedJigsawModules()); ret set; } selfType init() { allFullyQualifiedClassNames(); this; } S findClass(S name) { for (S pkg : importedPackages) { S fullName = pkg + "." + name; if (allFullyQualifiedClassNames().contains(fullName)) ret fullName; } null; } void printMe { printVars("ClassNameResolver", +byteCodePath); print(+importedPackages); } }