本文整理了Java中org.jruby.RubyClass.searchInternalModuleVariable
方法的一些代码示例,展示了RubyClass.searchInternalModuleVariable
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RubyClass.searchInternalModuleVariable
方法的具体详情如下:
包路径:org.jruby.RubyClass
类名称: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"));
}
内容来源于网络,如有侵权,请联系作者删除!