org.jruby.RubyClass.searchInternalModuleVariable()方法的使用及代码示例

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

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

RubyClass.searchInternalModuleVariable介绍

暂无

代码示例

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

private static IRubyObject vpPrecLimit(final Ruby runtime) {
  return runtime.getClass("BigDecimal").searchInternalModuleVariable("vpPrecLimit");
}

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

private static long bigDecimalVar(Ruby runtime, String variableName) {
  return ((RubyFixnum) runtime.getClass("BigDecimal").searchInternalModuleVariable(variableName)).getLongValue();
}

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

private RubyBigDecimal setResult(int scale) {
  int prec = RubyFixnum.fix2int(getRuntime().getClass("BigDecimal").searchInternalModuleVariable("vpPrecLimit"));
  int prec2 = Math.max(scale, prec);
  if (prec2 > 0 && this.value.scale() > (prec2-getExponent())) {
    this.value = this.value.setScale(prec2-getExponent(), BigDecimal.ROUND_HALF_UP);
  }
  return this;
}

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

private RubyBigDecimal setResult(int scale) {
  int prec = RubyFixnum.fix2int(getRuntime().getClass("BigDecimal").searchInternalModuleVariable("vpPrecLimit"));
  int prec2 = Math.max(scale, prec);
  if (prec2 > 0 && this.value.scale() > (prec2-getExponent())) {
    this.value = this.value.setScale(prec2-getExponent(), BigDecimal.ROUND_HALF_UP);
  }
  return this;
}

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

private static RoundingMode getRoundingMode(Ruby runtime) {
  RubyFixnum roundingMode = (RubyFixnum)runtime.getClass("BigDecimal")
      .searchInternalModuleVariable("vpRoundingMode");
  return RoundingMode.valueOf((int)roundingMode.getLongValue());
}

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

private static RoundingMode getRoundingMode(Ruby runtime) {
  RubyFixnum roundingMode = (RubyFixnum)runtime.getClass("BigDecimal")
      .searchInternalModuleVariable("vpRoundingMode");
  return RoundingMode.valueOf((int)roundingMode.getLongValue());
}

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

@JRubyMethod(name = "*", required = 1, compat = CompatVersion.RUBY1_9)
public IRubyObject op_mul19(ThreadContext context, IRubyObject arg) {
  return mult219(context, arg, getRuntime().getClass("BigDecimal")
      .searchInternalModuleVariable("vpPrecLimit"));
}

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

@JRubyMethod(name = "*", required = 1, compat = CompatVersion.RUBY1_9)
public IRubyObject op_mul19(ThreadContext context, IRubyObject arg) {
  return mult219(context, arg, getRuntime().getClass("BigDecimal")
      .searchInternalModuleVariable("vpPrecLimit"));
}

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

@JRubyMethod(name = "*", required = 1, compat = CompatVersion.RUBY1_8)
public IRubyObject op_mul(ThreadContext context, IRubyObject arg) {
  return mult2(context, arg, getRuntime().getClass("BigDecimal")
      .searchInternalModuleVariable("vpPrecLimit"));
}

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

@JRubyMethod(name = "*", required = 1, compat = CompatVersion.RUBY1_8)
public IRubyObject op_mul(ThreadContext context, IRubyObject arg) {
  return mult2(context, arg, getRuntime().getClass("BigDecimal")
      .searchInternalModuleVariable("vpPrecLimit"));
}

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

private static boolean isOverflowExceptionMode(Ruby runtime) {
  RubyFixnum currentExceptionMode = (RubyFixnum)runtime.getClass("BigDecimal")
      .searchInternalModuleVariable("vpExceptionMode");
  RubyFixnum EXCEPTION_OVERFLOW = (RubyFixnum)runtime.getClass("BigDecimal")
      .getConstant("EXCEPTION_OVERFLOW");
  return (currentExceptionMode.getLongValue() & EXCEPTION_OVERFLOW.getLongValue()) != 0;
}

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

private static boolean isNaNExceptionMode(Ruby runtime) {
  RubyFixnum currentExceptionMode = (RubyFixnum)runtime.getClass("BigDecimal")
      .searchInternalModuleVariable("vpExceptionMode");
  RubyFixnum EXCEPTION_NaN = (RubyFixnum)runtime.getClass("BigDecimal")
      .getConstant("EXCEPTION_NaN");
  return (currentExceptionMode.getLongValue() & EXCEPTION_NaN.getLongValue()) != 0;
}

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

private static boolean isInfinityExceptionMode(Ruby runtime) {
  RubyFixnum currentExceptionMode = (RubyFixnum)runtime.getClass("BigDecimal")
      .searchInternalModuleVariable("vpExceptionMode");
  RubyFixnum EXCEPTION_INFINITY = (RubyFixnum)runtime.getClass("BigDecimal")
      .getConstant("EXCEPTION_INFINITY");
  return (currentExceptionMode.getLongValue() & EXCEPTION_INFINITY.getLongValue()) != 0;
}

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

@JRubyMethod(name = "+", compat = CompatVersion.RUBY1_8)
public IRubyObject op_plus(ThreadContext context, IRubyObject b) {
  RubyBigDecimal val = getVpValue(b, false);
  return addInternal(context, val, b, getRuntime().getClass("BigDecimal")
      .searchInternalModuleVariable("vpPrecLimit"));
}

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

private static boolean isNaNExceptionMode(Ruby runtime) {
  RubyFixnum currentExceptionMode = (RubyFixnum)runtime.getClass("BigDecimal")
      .searchInternalModuleVariable("vpExceptionMode");
  RubyFixnum EXCEPTION_NaN = (RubyFixnum)runtime.getClass("BigDecimal")
      .getConstant("EXCEPTION_NaN");
  return (currentExceptionMode.getLongValue() & EXCEPTION_NaN.getLongValue()) != 0;
}

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

private static boolean isInfinityExceptionMode(Ruby runtime) {
  RubyFixnum currentExceptionMode = (RubyFixnum)runtime.getClass("BigDecimal")
      .searchInternalModuleVariable("vpExceptionMode");
  RubyFixnum EXCEPTION_INFINITY = (RubyFixnum)runtime.getClass("BigDecimal")
      .getConstant("EXCEPTION_INFINITY");
  return (currentExceptionMode.getLongValue() & EXCEPTION_INFINITY.getLongValue()) != 0;
}

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

@JRubyMethod(name = "+", compat = CompatVersion.RUBY1_9)
public IRubyObject op_plus19(ThreadContext context, IRubyObject b) {
  RubyBigDecimal val = getVpValue19(context, b, false);
  return addInternal(context, val, b, getRuntime().getClass("BigDecimal")
      .searchInternalModuleVariable("vpPrecLimit"));
}

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

private static boolean isOverflowExceptionMode(Ruby runtime) {
  RubyFixnum currentExceptionMode = (RubyFixnum)runtime.getClass("BigDecimal")
      .searchInternalModuleVariable("vpExceptionMode");
  RubyFixnum EXCEPTION_OVERFLOW = (RubyFixnum)runtime.getClass("BigDecimal")
      .getConstant("EXCEPTION_OVERFLOW");
  return (currentExceptionMode.getLongValue() & EXCEPTION_OVERFLOW.getLongValue()) != 0;
}

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

@JRubyMethod(name = "+", compat = CompatVersion.RUBY1_9)
public IRubyObject op_plus19(ThreadContext context, IRubyObject b) {
  RubyBigDecimal val = getVpValue19(context, b, false);
  return addInternal(context, val, b, getRuntime().getClass("BigDecimal")
      .searchInternalModuleVariable("vpPrecLimit"));
}

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

@JRubyMethod(name = "+", compat = CompatVersion.RUBY1_8)
public IRubyObject op_plus(ThreadContext context, IRubyObject b) {
  RubyBigDecimal val = getVpValue(b, false);
  return addInternal(context, val, b, getRuntime().getClass("BigDecimal")
      .searchInternalModuleVariable("vpPrecLimit"));
}

相关文章

微信公众号

最新文章

更多

RubyClass类方法