if (value instanceof RubyBoolean) return (Object)((RubyBoolean)value).toJava(Boolean.class);
if (value instanceof RubyFixnum) return (Object)((RubyFixnum)value).toJava(Long.class);
if (value instanceof DiametricUUID) return ((DiametricUUID)value).getUUID();
if (value instanceof RubyBignum) {
RubyString svalue = (RubyString)((RubyBignum)value).to_s();
java.math.BigInteger bivalue = new java.math.BigInteger((String)svalue.toJava(String.class));
return (Object)bivalue;
}
if (value instanceof RubyFloat) return (Object)((RubyFloat)value).toJava(Double.class);
if (value instanceof RubyTime) {
RubyTime tmvalue = (RubyTime)value;