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

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

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

Ruby.unregisterInspecting介绍

暂无

代码示例

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

private static IRubyObject inspectPuts(ThreadContext context, IRubyObject maybeIO, RubyArray array) {
  Ruby runtime = context.runtime;
  try {
    runtime.registerInspecting(array);
    return puts(context, maybeIO, array.toJavaArray());
  }
  finally {
    runtime.unregisterInspecting(array);
  }
}

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

private static IRubyObject inspectPuts(ThreadContext context, IRubyObject maybeIO, RubyArray array) {
  try {
    context.runtime.registerInspecting(array);
    return putsArray(context, maybeIO, array.toJavaArrayMaybeUnsafe());
  } finally {
    context.runtime.unregisterInspecting(array);
  }
}

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

private static IRubyObject inspectPuts(ThreadContext context, IRubyObject maybeIO, RubyArray array) {
  Ruby runtime = context.runtime;
  try {
    runtime.registerInspecting(array);
    return puts(context, maybeIO, array.toJavaArray());
  } finally {
    runtime.unregisterInspecting(array);
  }
}

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

private static IRubyObject inspectPuts(ThreadContext context, IRubyObject maybeIO, RubyArray array) {
  try {
    context.runtime.registerInspecting(array);
    return putsArray(context, maybeIO, array.toJavaArray());
  } finally {
    context.runtime.unregisterInspecting(array);
  }
}

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

private static IRubyObject inspectPuts(ThreadContext context, IRubyObject maybeIO, RubyArray array) {
  Ruby runtime = context.runtime;
  try {
    runtime.registerInspecting(array);
    return puts(context, maybeIO, array.toJavaArray());
  } finally {
    runtime.unregisterInspecting(array);
  }
}

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

private static IRubyObject inspectPuts(ThreadContext context, IRubyObject maybeIO, RubyArray array) {
  try {
    context.runtime.registerInspecting(array);
    return putsArray(context, maybeIO, array.toJavaArray());
  } finally {
    context.runtime.unregisterInspecting(array);
  }
}

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

private static IRubyObject inspectPuts(ThreadContext context, IRubyObject maybeIO, RubyArray array) {
  Ruby runtime = context.runtime;
  try {
    runtime.registerInspecting(array);
    return puts(context, maybeIO, array.toJavaArray());
  }
  finally {
    runtime.unregisterInspecting(array);
  }
}

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

private static IRubyObject inspectPuts(ThreadContext context, IRubyObject maybeIO, RubyArray array) {
  try {
    context.runtime.registerInspecting(array);
    return putsArray(context, maybeIO, array.toJavaArrayMaybeUnsafe());
  } finally {
    context.runtime.unregisterInspecting(array);
  }
}

代码示例来源: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-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: com.ning.billing/killbill-osgi-bundles-jruby

private IRubyObject inspectPuts(ThreadContext context, RubyArray array) {
  try {
    getRuntime().registerInspecting(array);
    return puts(context, array.toJavaArray());
  } finally {
    getRuntime().unregisterInspecting(array);
  }
}

代码示例来源: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: org.kill-bill.billing/killbill-osgi-bundles-jruby

private IRubyObject inspectPuts(ThreadContext context, RubyArray array) {
  try {
    getRuntime().registerInspecting(array);
    return puts(context, array.toJavaArray());
  } finally {
    getRuntime().unregisterInspecting(array);
  }
}

代码示例来源: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: 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: 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

@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);
  }
}

相关文章

微信公众号

最新文章

更多

Ruby类方法