Charles Oliver Nutter wrote:
> Jochen Theodorou wrote:
>> ah, ok... so it most probably will not work with another VM?
> 
> There are other VMs? :)
> 
> Seriously though...most of the JVMs out there license Sun's 
> implementation of the core classes, so I suspect this would work on a 
> lot of them. And the others...well, we could have a separate hack for 
> them, if people really need it.

Also, FWIW, the reason we're not using this in JRuby to track Java-class 
metadata is because it obviously depends on security settings being lax 
enough to setAccessible the annotation collections. I'm not sure it 
would be a good general solution, but it could be used when possible 
with a fallback to existing caching mechanisms.

It also has the down side that whatever you insert in a given class darn 
well better work across that class across all child classloaders. So for 
classes loaded at the highest levels, you'd still need some indirection 
to get the appropriate metadata for the "current" Groovy or JRuby 
runtime. It could also be an issue for interface injection, though in 
both cases it may be mitigated by having a separate TypeHolder loaded at 
the lower-level; there would then be multiple entries in the map, and 
the problem is solved. Now you just need to make sure they're cleaned up 
if the child classloader goes away :)

- Charlie

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to