commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <flame...@gmail.com>
Subject Re: [lang] new method on ClassUtils
Date Fri, 28 Jan 2005 20:52:47 GMT
The important part for me is the munging that stops primitives being
special and [] not working. I'm happy to replace the forName part with
a better way and rename to getClass.

Would Thread.currentThread().getContextClassLoader().loadClass(String)
be acceptable instead of the forName call?

Hen

On Thu, 27 Jan 2005 23:43:58 -0000, Stephen Colebourne
<scolebourne@btopenworld.com> wrote:
> While I support the addition of a get class method in principle, I am
> concerned that this brushes over the class loader issue. I would say that
> Class.forName() will often cause problems, so maybe this isn't the best way
> to code this.
> 
> Stephen
> 
> ----- Original Message -----
> From: "Henri Yandell" <flamefew@gmail.com>
> >I committed this btw.
> >
> > Hen
> >
> > On Wed, 26 Jan 2005 17:34:39 -0500, Henri Yandell <flamefew@gmail.com>
> > wrote:
> >> I'd like to add ClassUtils.forName; to all intents and purposes the
> >> same as Class.forName except that:
> >>
> >> 1) It understands arrays ending with [] instead of the [L<class>;
> >> ugliness.
> >> 2) It can handle primitives, "int" would correctly return int.class.
> >> 3) (perhaps?) null-safe. No idea really, just throwing it in :)
> >>
> >> Hen
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message