This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: importing java packages
Per Bothner <per@bothner.com> writes:
> Chris Dean wrote:
>> How about this alternate feature:
>> (define-package-namespaces <java.awt>)
>> which would create (define-namespace JFrame <java.awt.JFrame>) etc.
>
> If there were a way to enumerate the classes in a package, then one
> could write a syntax-case macro for define-package-namespaces.
Sure, but I don't think there is a portable way to do this (like
Dominique said). I'm not above walking through jar files, but I don't
think that technique would work onder every JVM. I could be wrong.
> Instead, we'd need a way to modify the search order of <NAME> and/or
> PREFIX:NAME. It might be a useful extension to translate identifier
> patterns. This would be a generalization of identifier macros, but
> allowing patterns:
That's more like what I was thinking.
Regards,
Chris Dean