@SuppressWarnings("deprecation")
public CompiledScript compile(java.io.Reader script) throws ScriptException {
CompiledScript ret = null;
Context cx = enterContext();
try {
String fileName = (String) get(ScriptEngine.FILENAME);
if (fileName == null) {
fileName = "<Unknown Source>";
}
Scriptable scope = getRuntimeScope(context);
Script scr = cx.compileReader(scope, script, fileName, 1, null);
ret = new RhinoCompiledScript(this, scr);
} catch (Exception e) {
throw new ScriptException(e);
} finally {
Context.exit();
}
return ret;
}
RhinoScriptEngine.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:ef-orm
作者:
评论列表
文章目录