Do you think we need to go through the trouble of throwing an
IllegalArgumentException if it's not a well-formed class name (starts with
character, blah blah blah)?  Or, can we just let it throw a
ClassNotFoundException after doing as much as we can with the string that's
passed in (i.e. transforming it into the proper format)? 


-----Original Message-----
From: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 06, 2005 10:39 AM
To: Jakarta Commons Developers List
Subject: Re: [lang] enhanced version of Class.forName

On 9/6/05, James Carman <[EMAIL PROTECTED]> wrote:
> 1.  Well, it's not exactly the same thing.  I'm talking about when they
pass
> in just "boolean" or "int".  In that case, we construct the name "[B" or
> "[I" and pass that to Class.forName() with the "initialize" parameter,
> thereby telling it whether to initialize the array class and not
> (necessarily) the component type class.

If I understand the VM spec correctly, the initialization is
recursively applied to the component type:

http://java.sun.com/docs/books/vmspec/2nd-edition/html/ConstantPool.doc.html
#79473

> 2.  Your parsing code didn't support the "proper" type format for arrays.
> We want this method to do so.

If you want me to, I can enhance it accordingly this evening.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to