}
private void scanDirectory(Set<Class<?>> results, String baseUrl) throws IOException, ClassNotFoundException, URISyntaxException {
URL asUrl = ConfigurableClassFinder.class.getClassLoader().getResource(baseUrl);
if (asUrl == null)
throw new AkibanInternalException("base url not found: " + baseUrl);
Navigator navigator;
try {
navigator = Navigator.valueOf(asUrl.getProtocol().toUpperCase());
}
catch (IllegalArgumentException e) {
throw new AkibanInternalException("unrecognized resource type " + asUrl.getProtocol() + " for " + asUrl);
}
for (String filePath : navigator.getFiles(baseUrl)) {
assert filePath.endsWith(".class") : filePath;
int trimLength = filePath.length() - ".class".length();
String className = filePath.replace('/', '.').substring(0, trimLength);