Version 1 (modified by jpallister, 12 years ago) (diff)

Initial, very rough draft. But at least it exists...

Java Foreign Function Interface

(This is a very rough draft thrown together from an email by Alessio Stalla to the mailing list.)

A quick "cheat sheet":

(jclass <class name>)
gives you a Java class
(jmethod <java class> <method names> <&rest argument types>)
gives you a method
(jconstructor <java class> <&rest argument types>)
a constructor
(jnew <constructor> <&rest arguments>)
instantiates a new Java object
(jcall <method> <object> <&rest arguments>)
calls a method
to access static fields and methods.
to access fields.
jproperty-value and (setf jproperty-value)
access "properties" following the Java Bean convention (setXXX and getXXX).

That's almost all; there is some more advanced stuff (e.g. manipulating Java arrays).

You can find most or all of this stuff inside ( It's not documented but quite readable.