in src/main/java/com/googlesource/gerrit/plugins/scripting/scala/ScalaPluginScriptEngine.java [80:105]
private AbstractFile getClassFile(String fullClassName, Map<String, AbstractFile> tree)
throws ClassNotFoundException {
String[] nameComponents = fullClassName.split("\\.");
nameComponents[nameComponents.length - 1] =
nameComponents[nameComponents.length - 1] + CLASS_EXTENSION;
for (String component : nameComponents) {
Option<AbstractFile> node = tree.get(component);
if (node.isEmpty()) {
throw new ClassNotFoundException(
"Cannot find compiled Scala code for class "
+ fullClassName
+ ": "
+ component
+ " is unknown");
}
AbstractFile abstractFile = node.get();
if (component.endsWith(CLASS_EXTENSION)) {
return abstractFile;
} else {
tree = ((VirtualDirectory) abstractFile).scala$reflect$io$VirtualDirectory$$files();
}
}
throw new ClassNotFoundException(
"Cannot find compiled Scala code for class " + fullClassName);
}