Converts a jobject to a Lisp object where possible.
A jobject or
A generalized boolean.
jobject-to-lisp converts a jobject to a Lisp object where possible.
The argument object must be a jobject or
nil, otherwise an error is signaled. If object is
nil. If object is a jobject of type
java.lang.String or any of the primitive types,
jobject-to-lisp returns the matching Lisp object. See Types and conversion between Lisp and Java for a full description.
If the conversion cannot be done, the return value depends on the value of nil-when-fail. When nil-when-fail is true
nil for failure. When nil-when-fail is false,
jobject-to-lisp returns the jobject itself. The default value of nil-when-fail is true.
You need to pass nil-when-fail as
nil for the cases when you want to be able to distinguish between return value
nil for the Java boolean
false and failure to convert. When you do that, the caller code needs to compare the result to the argument, instead of checking for non-nil, like this:
LispWorks User Guide and Reference Manual - 20 Sep 2017