[armedbear-devel] Better Java interop

Alessio Stalla alessiostalla at gmail.com
Thu Jul 1 21:32:38 UTC 2010


Tonight I committed two changes that will hopefully enhance Java
interoperability on ABCL:

1) extensible classpath: two new primitives, java:add-to-classpath and
java:dump-classpath, allow respectively to add a path/URL (or a list
of them) to the classpath at runtime, and to inspect the classpath for
debugging purposes.

2) proxying more than one interface: jmake-proxy now can also accept a
list of interfaces to implement in Lisp.


I also plan to add some other features, but I'd like to hear feedback
about them first:

1) generified <T> T LispObject.javaInstance(Class<T>) to typecheck and
avoid casts in user code converting Lisp objects to Java objects.

2) a configurable lists of Java packages to search for classes, so
that users might write non-fully-qualified class names, e.g. (jclass
"String").

3) JSS-like syntax for easy method invocation (#methodName args),
disabled by default

4) capability of jmethod, jfield, jconstructor to access private
members (setAccessible(true)) depending on a special variable (or a
function parameter). This was proposed by someone else some time ago
but never implemented.

Bye,
Alessio




More information about the armedbear-devel mailing list