This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Illegal Access in module class?
- From: Per Bothner <per at bothner dot com>
- To: Steve Smith <tarka at internode dot on dot net>
- Cc: kawa at sources dot redhat dot com
- Date: Tue, 29 Aug 2006 08:28:56 -0700
- Subject: Re: Illegal Access in module class?
- References: <20060829005320.GA22909@lucretia.remote.isay.com.au>
Steve Smith wrote:
Hi,
I'm trying to push on with using Kawa as a plugin language for web
apps. However I'm seeing IllegalAccess errors when doing runtime
string casts. My class looks like this:
(module-name 'au.com.isay.confluence.plugins.torrent)
...
(define-simple-class <au.com.isay.confluence.plugins.torrent.TorrentMacro>
(<com.atlassian.renderer.v2.macro.BaseMacro>)
Is the first line a typo? In the first line "torrent" is a class name,
and then later it's a package name. That's unusual to say the least.
In any Kawa case assume all the classes defined in a single module,
including the ModuleBody itself, are in the same package. That allows
Lit0 to be compiled with default access.
You can argue that this restriction is an undocumented bug, and you
might be right ... Fixing it might be doable (I don't know yet how
best to do it or how difficult it would be), but it's not currently
on my list of things to do. The complication is that we don't want
to just make Lit0 public - we'd have to move it to a helper class.
We do that when you use an explicit module-extends, and we might be
able to use the same helper class.
--
--Per Bothner
per@bothner.com http://per.bothner.com/