[armedbear-devel] help on using cl-dot with java-objects

Kilian Sprotte kilian.sprotte at gmail.com
Fri Oct 18 17:05:53 UTC 2013


I had a very happy start on using cl-dot with java-objects,
utilizing methods such as cl-dot:graph-object-points-to directly
specialized on java classes:

(defmethod cl-dot:graph-object-points-to ((graph (eql 'graph))
                                          (object (java:jclass "SomeClass")))

This all went very well until I realized that java objects are boxed and a
second call to the same java method returning the same java object will
result in a different wrapper each time, so that in lisp they aren't eql,
which is what cl-dot would expect.

Now I realize that at least they are equal. But is this == or Object.equals?

As an aside: Is it possible to call == from lisp?

I know there has been a thread "eql for java objects" some time ago. I am
looking here for a practical solution about how to use cl-dot with java
objects. If anybody would like to comment on how to go about it, please go


More information about the armedbear-devel mailing list