commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <>
Subject RE: [lang] enhanced version of Class.forName
Date Tue, 06 Sep 2005 14:45:00 GMT
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 [] 
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 <> wrote:
> 1.  Well, it's not exactly the same thing.  I'm talking about when they
> 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:

> 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.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message