[armedbear-devel] Better Java interop

Alan Ruttenberg alanruttenberg at gmail.com
Fri Jul 2 14:28:58 UTC 2010


On Thu, Jul 1, 2010 at 5:32 PM, Alessio Stalla <alessiostalla at gmail.com> wrote:
> 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

Any reason not to use the same syntax: #".." - will make it much
easier to migrate.
Also note that in JSS #0"foo" returns the result of the call without
casting to lisp object - e.g. (#"toString" ...) will return a java
instance rather than a lisp string.

>
> 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
>
> _______________________________________________
> armedbear-devel mailing list
> armedbear-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
>




More information about the armedbear-devel mailing list