org.jruby.Ruby.parseFileFromMain()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(119)

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

Ruby.parseFileFromMain介绍

暂无

代码示例

代码示例来源:origin: org.jruby/jruby-complete

public ParseResult parseFromMain(String fileName, InputStream in) {
  if (config.isInlineScript()) return (ParseResult) parseInline(in, fileName, getCurrentContext().getCurrentScope());
  return parseFileFromMain(fileName, in, getCurrentContext().getCurrentScope());
}

代码示例来源:origin: org.jruby/jruby-core

public ParseResult parseFromMain(String fileName, InputStream in) {
  if (config.isInlineScript()) return (ParseResult) parseInline(in, fileName, getCurrentContext().getCurrentScope());
  return parseFileFromMain(fileName, in, getCurrentContext().getCurrentScope());
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

/**
 * Parse the script contained in the given input stream, using the given
 * filename as the name of the script, and return the root Node. This
 * is used to verify that the script syntax is valid, for jruby -c. The
 * current scope (generally the top-level scope) is used as the parent
 * scope for parsing.
 * 
 * @param inputStream The input stream from which to read the script
 * @param filename The filename to use for parsing
 * @returns The root node of the parsed script
 */
public Node parseFromMain(InputStream inputStream, String filename) {
  if (config.isInlineScript()) {
    return parseInline(inputStream, filename, getCurrentContext().getCurrentScope());
  } else {
    return parseFileFromMain(inputStream, filename, getCurrentContext().getCurrentScope());
  }
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

/**
 * Parse the script contained in the given input stream, using the given
 * filename as the name of the script, and return the root Node. This
 * is used to verify that the script syntax is valid, for jruby -c. The
 * current scope (generally the top-level scope) is used as the parent
 * scope for parsing.
 * 
 * @param inputStream The input stream from which to read the script
 * @param filename The filename to use for parsing
 * @returns The root node of the parsed script
 */
public Node parseFromMain(InputStream inputStream, String filename) {
  if (config.isInlineScript()) {
    return parseInline(inputStream, filename, getCurrentContext().getCurrentScope());
  } else {
    return parseFileFromMain(inputStream, filename, getCurrentContext().getCurrentScope());
  }
}

代码示例来源:origin: org.jruby/jruby-complete

/**
 * Parse the script contained in the given input stream, using the given
 * filename as the name of the script, and return the root Node. This
 * is used to verify that the script syntax is valid, for jruby -c. The
 * current scope (generally the top-level scope) is used as the parent
 * scope for parsing.
 *
 * @param inputStream The input stream from which to read the script
 * @param filename The filename to use for parsing
 * @returns The root node of the parsed script
 */
public Node parseFromMain(InputStream inputStream, String filename) {
  if (config.isInlineScript()) {
    return parseInline(inputStream, filename, getCurrentContext().getCurrentScope());
  } else {
    return parseFileFromMain(inputStream, filename, getCurrentContext().getCurrentScope());
  }
}

代码示例来源:origin: org.jruby/jruby-core

/**
 * Parse the script contained in the given input stream, using the given
 * filename as the name of the script, and return the root Node. This
 * is used to verify that the script syntax is valid, for jruby -c. The
 * current scope (generally the top-level scope) is used as the parent
 * scope for parsing.
 *
 * @param inputStream The input stream from which to read the script
 * @param filename The filename to use for parsing
 * @returns The root node of the parsed script
 */
public Node parseFromMain(InputStream inputStream, String filename) {
  if (config.isInlineScript()) {
    return parseInline(inputStream, filename, getCurrentContext().getCurrentScope());
  } else {
    return parseFileFromMain(inputStream, filename, getCurrentContext().getCurrentScope());
  }
}

相关文章

微信公众号

最新文章

更多

Ruby类方法