本文整理了Java中groovy.lang.GroovyClassLoader.setShouldRecompile()
方法的一些代码示例,展示了GroovyClassLoader.setShouldRecompile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GroovyClassLoader.setShouldRecompile()
方法的具体详情如下:
包路径:groovy.lang.GroovyClassLoader
类名称:GroovyClassLoader
方法名:setShouldRecompile
[英]sets if the recompilation should be enable. There are 3 possible values for this. Any value different than null overrides the value from the compiler configuration. true means to recompile if needed false means to never recompile.
[中]设置是否应启用重新编译。这有3个可能的值。任何不同于null的值都将重写编译器配置中的值。true表示在需要时重新编译。false表示从不重新编译。
代码示例来源:origin: com.sun.faces/jsf-impl
public MojarraGroovyClassLoader(GroovyScriptEngine gse) {
super(new URL[0], gse.getGroovyClassLoader());
gse.getGroovyClassLoader().setShouldRecompile(Boolean.TRUE);
this.gse = gse;
}
代码示例来源:origin: com.manydesigns/portofino-base
public static GroovyScriptEngine createScriptEngine(File classpathFile, ClassLoader parent) {
CompilerConfiguration cc = new CompilerConfiguration(CompilerConfiguration.DEFAULT);
String classpath = classpathFile.getAbsolutePath();
cc.setClasspath(classpath);
cc.setRecompileGroovySource(true);
GroovyScriptEngine scriptEngine;
try {
scriptEngine =
new GroovyScriptEngine(new URL[] { classpathFile.toURI().toURL() }, parent);
} catch (IOException e) {
throw new Error(e);
}
scriptEngine.setConfig(cc);
scriptEngine.getGroovyClassLoader().setShouldRecompile(true);
return scriptEngine;
}
}
代码示例来源:origin: de.huxhorn.sulky/de.huxhorn.sulky.groovy
gcl.setShouldRecompile(true);
try
代码示例来源:origin: huxi/sulky
gcl.setShouldRecompile(true);
try
代码示例来源:origin: bonitasoft/bonita-engine
@Override
public void start() throws SBonitaException {
groovyClassLoader = new GroovyClassLoader(classLoaderService.getLocalClassLoader(ScopeType.TENANT.name(), tenantId));
groovyClassLoader.setShouldRecompile(true);
try {
final File folder = getBonitaHomeServer().getSecurityScriptsFolder(tenantId);
groovyClassLoader.addClasspath(folder.getAbsolutePath());
} catch (BonitaHomeNotSetException | IOException e) {
throw new SExecutionException(e);
}
}
代码示例来源:origin: bonitasoft/bonita-engine
@Override
public void start() throws SBonitaException {
groovyClassLoader = new GroovyClassLoader(classLoaderService.getLocalClassLoader(ScopeType.TENANT.name(), tenantId));
groovyClassLoader.setShouldRecompile(true);
try {
final File folder = getBonitaHomeServer().getSecurityScriptsFolder(tenantId);
groovyClassLoader.addClasspath(folder.getAbsolutePath());
} catch (BonitaHomeNotSetException | IOException e) {
throw new SExecutionException(e);
}
}
代码示例来源:origin: ManyDesigns/Portofino
public void resetGroovyScriptEngine() throws FileSystemException {
CompilerConfiguration cc = new CompilerConfiguration(CompilerConfiguration.DEFAULT);
try {
String classpath = this.root.getName().getPath();
cc.setClasspath(classpath);
} catch (Exception e) {
logger.debug("Could not set classpath", e);
}
cc.setRecompileGroovySource(true);
groovyScriptEngine = new GroovyScriptEngine(new URL[] { this.root.getURL() }, getClassLoader());
groovyScriptEngine.setConfig(cc);
groovyScriptEngine.getGroovyClassLoader().setShouldRecompile(true);
}
代码示例来源:origin: jenkinsci/email-ext-plugin
if (!classpathList.isEmpty()) {
GroovyClassLoader gloader = new GroovyClassLoader(loader);
gloader.setShouldRecompile(true);
for (ClasspathEntry entry : classpathList) {
if (useSecurity) {
内容来源于网络,如有侵权,请联系作者删除!