AnonymousClassLoader and ClassLoader

John Rose John.Rose at Sun.COM
Thu Apr 24 16:20:40 PDT 2008


On Apr 24, 2008, at 2:26 AM, Rémi Forax wrote:

> In my opinion, getResource() is not the only method that makes this
> assumption

The getResource method probably needs to be adjusted since anonymous  
classes have names that are intentionally distorted.  The anonymous  
class name ends with "/${hashcode}" so that attempts to do forName  
will rapidly fail, and so that it is clear which classes are  
anonymous.  The logic for Class.resolveName needs to take this case  
into account if resources are to work.  (I assume that it is a good  
idea for them to "work", but maybe it's not.)  It's a good question,  
and a nice experiment.

-- John



More information about the mlvm-dev mailing list