
Ok even Allegro uses T and NIL for the Booleans.. which is why
CL-USER(17): (jclass-of (jfield "java.lang.Boolean" "TRUE")) NIL NIL
was still correct.. I think the closer we stick with Allegro the better. for future reference (to myself) to make a boolean one does: CL-USER(21): (jnew (jconstructor "java.lang.Boolean" "java.lang.String") "True") #<java.lang.Boolean true {44AC5E}> CL-USER(22): (jclass-of (jnew (jconstructor "java.lang.Boolean" "java.lang.String") "True")) "java.lang.Boolean" "java.lang.Boolean" If there is any action items out of all this: Perhaps: javaInstance() on Nil returns Boolean.FALSE? Then in Symbol.java Object javaInstance() { if (this == T) return Boolean.TRUE; return super.javaInstance(); } And in LispObject itself any thoughts on? LispObject.this.javaInstance(Class c) { if (c.isInstance(this)) return this; // widen and resubmit for subclasses if (c==int.class) return javaInstance(Integer.class); if (c==boolean.class) return javaInstance(Boolean.class); // they requested a boolean.. give it to them if (c==Boolean.class) return getBooleanValue(); ..... //hit the error logic } ----- Original Message ----- From: <dmiles@users.sourceforge.net> To: "Armed Bear" <armedbear-devel@common-lisp.net> Sent: Monday, November 23, 2009 7:42 AM Subject: Re: [armedbear-devel] SETF for JFEILDS
These 3 look good
CL-USER(2): (jclass-of (jfield "java.lang.System" "out")) "java.io.PrintStream" "java.io.PrintStream"
CL-USER(4): (jclass-of 1) NIL NIL
CL-USER(5): (jclass-of (make-immediate-object 1)) "java.lang.Integer" "java.lang.Integer"
But is this correct?
CL-USER(17): (jclass-of (jfield "java.lang.Boolean" "TRUE")) NIL NIL CL-USER(18): (jclass-of (jfield "java.lang.Boolean" "FALSE")) NIL NIL