I'm aware that this must be a stupid question, but after googling for a while can't find the right answer:
How can I invoke a method with a boolean as an argument. I try to do the following:
---8<--- (let* ((jlclass (jclass "java.lang.Class")) (for-name (jmethod jlclass "forName" (jclass "java.lang.String") (jclass "boolean") (jclass "java.lang.ClassLoader")))) (jstatic for-name jlclass "org.postgresql.Driver" t (get-current-classloader))) ---8<--- But it raises the error:
The value T is not of class boolean [Condition of type ERROR]
I tried replacing '(jclass "boolean") for '(jclass "java.lang.Boolean"), but in that case it doesn't find the for-name method.
How am I supposed to invoke the method!
Thanks in advance!
On 5/18/12 13:14 , Francisco Vides Fernández wrote: […]
How can I invoke a method with a boolean as an argument. I try to do the following:
---8<--- (let* ((jlclass (jclass "java.lang.Class")) (for-name (jmethod jlclass "forName" (jclass "java.lang.String") (jclass "boolean") (jclass "java.lang.ClassLoader")))) (jstatic for-name jlclass "org.postgresql.Driver" t (get-current-classloader))) ---8<--- But it raises the error:
The value T is not of class boolean [Condition of type ERROR]
I tried replacing '(jclass "boolean") for '(jclass "java.lang.Boolean"), but in that case it doesn't find the for-name method.
How am I supposed to invoke the method!
Use the Java primitive for boolean truth bound to the constant JAVA:+TRUE+ instead of t.
Not a stupid question at all: it should probably should go in our FAQ…
armedbear-devel@common-lisp.net