org.mozilla.javascript.Context.getImplementationVersion()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 JavaScript  
字(3.6k)|赞(0)|评价(0)|浏览(143)

本文整理了Java中org.mozilla.javascript.Context.getImplementationVersion()方法的一些代码示例,展示了Context.getImplementationVersion()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.getImplementationVersion()方法的具体详情如下:
包路径:org.mozilla.javascript.Context
类名称:Context
方法名:getImplementationVersion

Context.getImplementationVersion介绍

[英]Get the implementation version.

The implementation version is of the form

"name langVer release relNum date"

where name is the name of the product, langVer is the language version, relNum is the release number, and date is the release date for that specific release in the form "yyyy mm dd".
[中]获取实现版本。
实现版本的格式为

"name langVer release relNum date"

其中name是产品的名称,langVer是语言版本,relNum是发布号,date是特定版本的发布日期,格式为“yyy-mm-dd”。

代码示例

代码示例来源:origin: galenframework/galen

public static String getVersion() {
  return ContextFactory.getGlobal().enterContext().getImplementationVersion();
}

代码示例来源:origin: org.seasar.mayaa/mayaa

/**
 * Rhinoのバージョンを取得する。
 * @return Rhinoのバージョン
 */
public static String getRhinoVersion() {
  return Context.getCurrentContext().getImplementationVersion();
}

代码示例来源:origin: com.galenframework/galen-core

public static String getVersion() {
  return ContextFactory.getGlobal().enterContext().getImplementationVersion();
}

代码示例来源:origin: com.google.code.maven-play-plugin.com.asual.lesscss/lesscss-engine

public LessEngine(LessOptions options) {
  try {
    logger.debug("Initializing LESS Engine.");
    classLoader = getClass().getClassLoader();
    URL less = options.getLess();
    URL env = classLoader.getResource("META-INF/env.js");
    URL engine = classLoader.getResource("META-INF/engine.js");
    URL cssmin = classLoader.getResource("META-INF/cssmin.js");
    Context cx = Context.enter();
    logger.debug("Using implementation version: " + cx.getImplementationVersion());
    cx.setOptimizationLevel(9);
    Global global = new Global();
    global.init(cx);
    scope = cx.initStandardObjects(global);
    cx.evaluateReader(scope, new InputStreamReader(env.openConnection().getInputStream()), env.getFile(), 1, null);
    cx.evaluateString(scope, "lessenv.charset = '" + options.getCharset() + "';", "charset", 1, null);
    cx.evaluateString(scope, "lessenv.css = " + options.isCss() + ";", "css", 1, null);
    cx.evaluateReader(scope, new InputStreamReader(less.openConnection().getInputStream()), less.getFile(), 1, null);
    cx.evaluateReader(scope, new InputStreamReader(cssmin.openConnection().getInputStream()), cssmin.getFile(), 1, null);
    cx.evaluateReader(scope, new InputStreamReader(engine.openConnection().getInputStream()), engine.getFile(), 1, null);
    compileString = (Function) scope.get("compileString", scope);
    compileFile = (Function) scope.get("compileFile", scope);
    Context.exit();
  } catch (Exception e) {
    logger.error("LESS Engine intialization failed.", e);
  }
}

代码示例来源:origin: cardillo/joinery

System.getProperty("java.vendor"),
  System.getProperty("java.version"),
  ctx.getImplementationVersion()
);

代码示例来源:origin: joinery/joinery-dataframe

System.getProperty("java.vendor"),
  System.getProperty("java.version"),
  ctx.getImplementationVersion()
);

代码示例来源:origin: com.asual.lesscss/lesscss-engine

public RhinoCompiler(LessOptions options, ResourceLoader loader, URL less, URL env, URL engine, URL cssmin, URL sourceMap) throws IOException {
  Context cx = Context.enter();
  logger.debug("Using implementation version: "
      + cx.getImplementationVersion());
  cx.setOptimizationLevel(-1);
  Global global = new Global();

代码示例来源:origin: com.github.tntim96/rhino

if (filename == null) {
  console.println(cx.getImplementationVersion());

代码示例来源:origin: ro.isdc.wro4j/rhino

if (filename == null) {
  console.println(cx.getImplementationVersion());

相关文章

微信公众号

Context类方法