本文整理汇总了Java中org.mozilla.javascript.commonjs.module.provider.StrongCachingModuleScriptProvider类的典型用法代码示例。如果您正苦于以下问题:Java StrongCachingModuleScriptProvider类的具体用法?Java StrongCachingModuleScriptProvider怎么用?Java StrongCachingModuleScriptProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StrongCachingModuleScriptProvider类属于org.mozilla.javascript.commonjs.module.provider包,在下文中一共展示了StrongCachingModuleScriptProvider类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSandboxedRequire
import org.mozilla.javascript.commonjs.module.provider.StrongCachingModuleScriptProvider; //导入依赖的package包/类
private Require getSandboxedRequire(Context cx, Scriptable scope, boolean sandboxed)
throws URISyntaxException
{
return new Require(cx, cx.initStandardObjects(),
new StrongCachingModuleScriptProvider(
new UrlModuleSourceProvider(Collections.singleton(
getDirectory()), null)), null, null, true);
}
示例2: createRequire
import org.mozilla.javascript.commonjs.module.provider.StrongCachingModuleScriptProvider; //导入依赖的package包/类
private static Require createRequire(File dir, Context cx, Scriptable scope)
throws URISyntaxException
{
return new Require(cx, scope, new StrongCachingModuleScriptProvider(
new UrlModuleSourceProvider(Collections.singleton(new URI(
"file:" + dir.getAbsolutePath().replace(File.separatorChar,'/') + "/")),
Collections.singleton(new URI(ComplianceTest.class.getResource(".").toExternalForm() + "/")))),
null, null, false);
}
示例3: getSandboxedRequire
import org.mozilla.javascript.commonjs.module.provider.StrongCachingModuleScriptProvider; //导入依赖的package包/类
private Require getSandboxedRequire(Context cx, Scriptable scope, boolean sandboxed)
throws URISyntaxException
{
return new Require(cx, cx.initStandardObjects(),
new StrongCachingModuleScriptProvider(
new UrlModuleSourceProvider(Collections.singleton(
getDirectory()), null)), null, null, true);
}
示例4: createRequire
import org.mozilla.javascript.commonjs.module.provider.StrongCachingModuleScriptProvider; //导入依赖的package包/类
private static Require createRequire(File dir, Context cx, Scriptable scope)
throws URISyntaxException
{
return new Require(cx, scope, new StrongCachingModuleScriptProvider(
new UrlModuleSourceProvider(
Collections.singleton(dir.getAbsoluteFile().toURI()),
Collections.singleton(new URI(ComplianceTest.class.getResource(".").toExternalForm() + "/")))),
null, null, false);
}