本文整理了Java中org.jruby.Ruby.isInspecting
方法的一些代码示例,展示了Ruby.isInspecting
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.isInspecting
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:isInspecting
暂无
代码示例来源:origin: org.jruby/jruby-complete
private IRubyObject inspectJoin(ThreadContext context, RubyArray tmp, IRubyObject sep) {
Ruby runtime = context.runtime;
// If already inspecting, there is no need to register/unregister again.
if (runtime.isInspecting(this)) {
return tmp.join(context, sep);
}
try {
runtime.registerInspecting(this);
return tmp.join(context, sep);
} finally {
runtime.unregisterInspecting(this);
}
}
代码示例来源:origin: org.jruby/jruby-core
private IRubyObject inspectJoin(ThreadContext context, RubyArray tmp, IRubyObject sep) {
Ruby runtime = context.runtime;
// If already inspecting, there is no need to register/unregister again.
if (runtime.isInspecting(this)) {
return tmp.join(context, sep);
}
try {
runtime.registerInspecting(this);
return tmp.join(context, sep);
} finally {
runtime.unregisterInspecting(this);
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private IRubyObject inspectJoin(ThreadContext context, RubyArray tmp, IRubyObject sep) {
Ruby runtime = context.runtime;
// If already inspecting, there is no need to register/unregister again.
if (runtime.isInspecting(this)) {
return tmp.join(context, sep);
}
try {
runtime.registerInspecting(this);
return tmp.join(context, sep);
} finally {
runtime.unregisterInspecting(this);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private IRubyObject inspectJoin(ThreadContext context, RubyArray tmp, IRubyObject sep) {
Ruby runtime = context.runtime;
// If already inspecting, there is no need to register/unregister again.
if (runtime.isInspecting(this)) {
return tmp.join(context, sep);
}
try {
runtime.registerInspecting(this);
return tmp.join(context, sep);
} finally {
runtime.unregisterInspecting(this);
}
}
代码示例来源:origin: org.jruby/jruby-complete
@JRubyMethod(name = "inspect")
public IRubyObject inspect19(ThreadContext context) {
Ruby runtime = context.runtime;
if (runtime.isInspecting(this)) return inspect(context, true);
try {
runtime.registerInspecting(this);
return inspect(context, false);
} finally {
runtime.unregisterInspecting(this);
}
}
代码示例来源:origin: org.jruby/jruby-core
@JRubyMethod(name = "inspect")
public IRubyObject inspect19(ThreadContext context) {
Ruby runtime = context.runtime;
if (runtime.isInspecting(this)) return inspect(context, true);
try {
runtime.registerInspecting(this);
return inspect(context, false);
} finally {
runtime.unregisterInspecting(this);
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = "inspect", compat = RUBY1_9)
public IRubyObject inspect19(ThreadContext context) {
Ruby runtime = context.runtime;
if (runtime.isInspecting(this)) return inspect(context, true);
try {
runtime.registerInspecting(this);
return inspect(context, false);
} finally {
runtime.unregisterInspecting(this);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = "inspect", compat = RUBY1_9)
public IRubyObject inspect19(ThreadContext context) {
Ruby runtime = context.runtime;
if (runtime.isInspecting(this)) return inspect(context, true);
try {
runtime.registerInspecting(this);
return inspect(context, false);
} finally {
runtime.unregisterInspecting(this);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private static String inspectJoin(ThreadContext context, IRubyObject recv, RubyArray parent, RubyArray array) {
Ruby runtime = context.runtime;
// If already inspecting, there is no need to register/unregister again.
if (runtime.isInspecting(parent)) return join(context, recv, array).toString();
try {
runtime.registerInspecting(parent);
return join(context, recv, array).toString();
} finally {
runtime.unregisterInspecting(parent);
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private static String inspectJoin(ThreadContext context, IRubyObject recv, RubyArray parent, RubyArray array) {
Ruby runtime = context.runtime;
// If already inspecting, there is no need to register/unregister again.
if (runtime.isInspecting(parent)) return join(context, recv, array).toString();
try {
runtime.registerInspecting(parent);
return join(context, recv, array).toString();
} finally {
runtime.unregisterInspecting(parent);
}
}
代码示例来源:origin: org.jruby/jruby-complete
/** rb_hash_inspect
*
*/
@JRubyMethod(name = "inspect")
public IRubyObject inspect(ThreadContext context) {
if (size == 0) return RubyString.newUSASCIIString(context.runtime, "{}");
if (context.runtime.isInspecting(this)) return RubyString.newUSASCIIString(context.runtime, "{...}");
try {
context.runtime.registerInspecting(this);
return inspectHash(context);
} finally {
context.runtime.unregisterInspecting(this);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/** rb_hash_to_s & to_s_hash
*
*/
@JRubyMethod(name = "to_s")
public IRubyObject to_s(ThreadContext context) {
Ruby runtime = context.runtime;
if (runtime.isInspecting(this)) return runtime.newString("{...}");
try {
runtime.registerInspecting(this);
return to_a().to_s();
} finally {
runtime.unregisterInspecting(this);
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/** rb_hash_to_s & to_s_hash
*
*/
@JRubyMethod(name = "to_s")
public IRubyObject to_s(ThreadContext context) {
Ruby runtime = context.runtime;
if (runtime.isInspecting(this)) return runtime.newString("{...}");
try {
runtime.registerInspecting(this);
return to_a().to_s();
} finally {
runtime.unregisterInspecting(this);
}
}
代码示例来源:origin: org.jruby/jruby-core
/** rb_hash_inspect
*
*/
@JRubyMethod(name = "inspect")
public IRubyObject inspect(ThreadContext context) {
if (size == 0) return RubyString.newUSASCIIString(context.runtime, "{}");
if (context.runtime.isInspecting(this)) return RubyString.newUSASCIIString(context.runtime, "{...}");
try {
context.runtime.registerInspecting(this);
return inspectHash(context);
} finally {
context.runtime.unregisterInspecting(this);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = "inspect", compat = RUBY1_9)
public IRubyObject inspect19(ThreadContext context) {
if (size == 0) return RubyString.newUSASCIIString(context.runtime, "{}");
if (getRuntime().isInspecting(this)) return RubyString.newUSASCIIString(context.runtime, "{...}");
try {
getRuntime().registerInspecting(this);
return inspectHash19(context);
} finally {
getRuntime().unregisterInspecting(this);
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = "inspect", compat = RUBY1_9)
public IRubyObject inspect19(ThreadContext context) {
if (size == 0) return RubyString.newUSASCIIString(context.runtime, "{}");
if (getRuntime().isInspecting(this)) return RubyString.newUSASCIIString(context.runtime, "{...}");
try {
getRuntime().registerInspecting(this);
return inspectHash19(context);
} finally {
getRuntime().unregisterInspecting(this);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/** rb_hash_inspect
*
*/
@JRubyMethod(name = "inspect", compat = RUBY1_8)
public IRubyObject inspect(ThreadContext context) {
if (size == 0) return getRuntime().newString("{}");
if (getRuntime().isInspecting(this)) return getRuntime().newString("{...}");
try {
getRuntime().registerInspecting(this);
return inspectHash(context);
} finally {
getRuntime().unregisterInspecting(this);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = {"inspect", "to_s"})
public IRubyObject inspect(ThreadContext context) {
if (getRuntime().isInspecting(this)) return getRuntime().newString("#<struct " + getMetaClass().getRealClass().getName() + ":...>");
try {
getRuntime().registerInspecting(this);
return inspectStruct(context);
} finally {
getRuntime().unregisterInspecting(this);
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/** rb_hash_inspect
*
*/
@JRubyMethod(name = "inspect", compat = RUBY1_8)
public IRubyObject inspect(ThreadContext context) {
if (size == 0) return getRuntime().newString("{}");
if (getRuntime().isInspecting(this)) return getRuntime().newString("{...}");
try {
getRuntime().registerInspecting(this);
return inspectHash(context);
} finally {
getRuntime().unregisterInspecting(this);
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = {"inspect", "to_s"})
public IRubyObject inspect(ThreadContext context) {
if (getRuntime().isInspecting(this)) return getRuntime().newString("#<struct " + getMetaClass().getRealClass().getName() + ":...>");
try {
getRuntime().registerInspecting(this);
return inspectStruct(context);
} finally {
getRuntime().unregisterInspecting(this);
}
}
内容来源于网络,如有侵权,请联系作者删除!