本文整理了Java中org.jruby.Ruby.setupSourceEncoding
方法的一些代码示例,展示了Ruby.setupSourceEncoding
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.setupSourceEncoding
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:setupSourceEncoding
暂无
代码示例来源:origin: org.jruby/jruby-complete
private Node parseFileAndGetAST(InputStream in, String file, DynamicScope scope, int lineNumber, boolean isFromMain) {
ParserConfiguration parserConfig =
new ParserConfiguration(this, lineNumber, false, true, isFromMain, config);
setupSourceEncoding(parserConfig, UTF8Encoding.INSTANCE);
return parser.parse(file, in, scope, parserConfig);
}
代码示例来源:origin: org.jruby/jruby-core
private Node parseFileAndGetAST(InputStream in, String file, DynamicScope scope, int lineNumber, boolean isFromMain) {
ParserConfiguration parserConfig =
new ParserConfiguration(this, lineNumber, false, true, isFromMain, config);
setupSourceEncoding(parserConfig, UTF8Encoding.INSTANCE);
return parser.parse(file, in, scope, parserConfig);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public Node parseInline(InputStream in, String file, DynamicScope scope) {
if (parserStats != null) parserStats.addEvalParse();
ParserConfiguration parserConfig =
new ParserConfiguration(this, 0, false, true, false, config);
if (is1_9) {
setupSourceEncoding(parserConfig);
}
return parser.parse(file, in, scope, parserConfig);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public Node parseInline(InputStream in, String file, DynamicScope scope) {
if (parserStats != null) parserStats.addEvalParse();
ParserConfiguration parserConfig =
new ParserConfiguration(this, 0, false, true, false, config);
if (is1_9) {
setupSourceEncoding(parserConfig);
}
return parser.parse(file, in, scope, parserConfig);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public Node parseFile(InputStream in, String file, DynamicScope scope, int lineNumber) {
if (parserStats != null) parserStats.addLoadParse();
ParserConfiguration parserConfig =
new ParserConfiguration(this, lineNumber, false, false, true, config);
if (is2_0 ||
(is1_9 && config.getSourceEncoding() != null)) {
setupSourceEncoding(parserConfig);
}
return parser.parse(file, in, scope, parserConfig);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public Node parseFileFromMain(InputStream in, String file, DynamicScope scope) {
if (parserStats != null) parserStats.addLoadParse();
ParserConfiguration parserConfig =
new ParserConfiguration(this, 0, false, false, true, true, config);
if (is2_0 ||
(is1_9 && config.getSourceEncoding() != null)) {
setupSourceEncoding(parserConfig);
}
return parser.parse(file, in, scope, parserConfig);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public Node parseFile(InputStream in, String file, DynamicScope scope, int lineNumber) {
if (parserStats != null) parserStats.addLoadParse();
ParserConfiguration parserConfig =
new ParserConfiguration(this, lineNumber, false, false, true, config);
if (is2_0 ||
(is1_9 && config.getSourceEncoding() != null)) {
setupSourceEncoding(parserConfig);
}
return parser.parse(file, in, scope, parserConfig);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public Node parseFileFromMain(InputStream in, String file, DynamicScope scope) {
if (parserStats != null) parserStats.addLoadParse();
ParserConfiguration parserConfig =
new ParserConfiguration(this, 0, false, false, true, true, config);
if (is2_0 ||
(is1_9 && config.getSourceEncoding() != null)) {
setupSourceEncoding(parserConfig);
}
return parser.parse(file, in, scope, parserConfig);
}
代码示例来源:origin: org.jruby/jruby-core
public Node parseInline(InputStream in, String file, DynamicScope scope) {
addEvalParseToStats();
ParserConfiguration parserConfig =
new ParserConfiguration(this, 0, false, true, false, config);
setupSourceEncoding(parserConfig, getEncodingService().getLocaleEncoding());
return parser.parse(file, in, scope, parserConfig);
}
代码示例来源:origin: org.jruby/jruby-complete
public Node parseInline(InputStream in, String file, DynamicScope scope) {
addEvalParseToStats();
ParserConfiguration parserConfig =
new ParserConfiguration(this, 0, false, true, false, config);
setupSourceEncoding(parserConfig, getEncodingService().getLocaleEncoding());
return parser.parse(file, in, scope, parserConfig);
}
内容来源于网络,如有侵权,请联系作者删除!