本文整理了Java中org.jruby.Ruby.getRuntimeCache
方法的一些代码示例,展示了Ruby.getRuntimeCache
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.getRuntimeCache
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:getRuntimeCache
[英]Get the core class RuntimeCache instance, for doing dynamic calls from core class methods.
[中]获取核心类RuntimeCache实例,用于从核心类方法执行动态调用。
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* Constructor for Context.
*/
private ThreadContext(Ruby runtime) {
this.runtime = runtime;
this.nil = runtime.getNil();
this.is19 = runtime.is1_9();
if (runtime.getInstanceConfig().isProfilingEntireRun())
startProfiling();
this.runtimeCache = runtime.getRuntimeCache();
// TOPLEVEL self and a few others want a top-level scope. We create this one right
// away and then pass it into top-level parse so it ends up being the top level.
StaticScope topStaticScope = runtime.getStaticScopeFactory().newLocalScope(null);
pushScope(new ManyVarsDynamicScope(topStaticScope, null));
Frame[] stack = frameStack;
int length = stack.length;
for (int i = 0; i < length; i++) {
stack[i] = new Frame();
}
BacktraceElement[] stack2 = backtrace;
int length2 = stack2.length;
for (int i = 0; i < length2; i++) {
stack2[i] = new BacktraceElement();
}
ThreadContext.pushBacktrace(this, "", "", 0);
ThreadContext.pushBacktrace(this, "", "", 0);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Constructor for Context.
*/
private ThreadContext(Ruby runtime) {
this.runtime = runtime;
this.nil = runtime.getNil();
this.is19 = runtime.is1_9();
if (runtime.getInstanceConfig().isProfilingEntireRun())
startProfiling();
this.runtimeCache = runtime.getRuntimeCache();
// TOPLEVEL self and a few others want a top-level scope. We create this one right
// away and then pass it into top-level parse so it ends up being the top level.
StaticScope topStaticScope = runtime.getStaticScopeFactory().newLocalScope(null);
pushScope(new ManyVarsDynamicScope(topStaticScope, null));
Frame[] stack = frameStack;
int length = stack.length;
for (int i = 0; i < length; i++) {
stack[i] = new Frame();
}
BacktraceElement[] stack2 = backtrace;
int length2 = stack2.length;
for (int i = 0; i < length2; i++) {
stack2[i] = new BacktraceElement();
}
ThreadContext.pushBacktrace(this, "", "", 0);
ThreadContext.pushBacktrace(this, "", "", 0);
}
代码示例来源:origin: org.jruby/jruby-core
this.runtimeCache = runtime.getRuntimeCache();
this.sites = runtime.sites;
代码示例来源:origin: org.jruby/jruby-complete
this.runtimeCache = runtime.getRuntimeCache();
this.sites = runtime.sites;
内容来源于网络,如有侵权,请联系作者删除!