This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Illegal Access in module class?


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]