@SuppressWarnings("unchecked")
protected Class<Script> compileScript(final String scriptBaseClass, String scriptSource, final String scriptName) {
final String script = preProcessScript(scriptSource);
GroovyCodeSource codeSource = AccessController.doPrivileged(new PrivilegedAction<GroovyCodeSource>() {
public GroovyCodeSource run() {
return new GroovyCodeSource(script, scriptName, getScriptCodeBase());
}
});
String currentScriptBaseClass = compilerConfiguration.getScriptBaseClass();
try {