super(loader, config, false);
setResLoader();
}
private void setResLoader() {
final GroovyResourceLoader rl = getResourceLoader();
setResourceLoader(new GroovyResourceLoader() {
public URL loadGroovySource(String className) throws MalformedURLException {
String filename;
for (String extension : getConfig().getScriptExtensions()) {
filename = className.replace('.', File.separatorChar) + "." + extension;
try {
URLConnection dependentScriptConn = rc.getResourceConnection(filename);
return dependentScriptConn.getURL();
} catch (ResourceException e) {
//TODO: maybe do something here?
}
}
return rl.loadGroovySource(className);
}
});
}