groovy.lang.GroovyResourceLoader Java Examples
The following examples show how to use
groovy.lang.GroovyResourceLoader.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GroovyScriptEngine.java From groovy with Apache License 2.0 | 6 votes |
private void setResLoader() { final GroovyResourceLoader rl = getResourceLoader(); setResourceLoader(className -> { 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); }); }
Example #2
Source File: ClassNodeCache.java From netbeans with Apache License 2.0 | 4 votes |
@Override public GroovyResourceLoader getResourceLoader() { return resourceLoader; }