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;
return (Object)tmvalue.getJavaDate();
}
if (value instanceof RubySymbol) {
// schema or data keyword
RubyString edn_string = (RubyString)RuntimeHelpers.invoke(context, value, "to_s");
return (Object)Keyword.intern((String)edn_string.asJavaString());
}
if (value.respondsTo("to_edn") && value.respondsTo("symbol")) {
// EDN::Type::Symbol (query)
RubyString edn_string = (RubyString)RuntimeHelpers.invoke(context, value, "to_edn");
return (Object)clojure.lang.Symbol.intern((String)edn_string.asJavaString());
}
if (value.respondsTo("to_time")) {
// DateTime or Date
RubyTime tmvalue = (RubyTime)RuntimeHelpers.invoke(context, value, "to_time");
return (Object)tmvalue.getJavaDate();
}
// needs to check Set since Set responses to "to_a"
if (value.respondsTo("intersection")) {
return getPersistentSet(context, value);
}