Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 6031 invoked from network); 24 Nov 2002 05:49:01 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 24 Nov 2002 05:49:01 -0000 Received: (qmail 19324 invoked by uid 97); 24 Nov 2002 05:50:10 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 19285 invoked by uid 97); 24 Nov 2002 05:50:09 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 19273 invoked by uid 98); 24 Nov 2002 05:50:08 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Content-Type: text/plain; charset="iso-8859-1" From: Steve Downey To: "Jakarta Commons Developers List" Subject: Re: [lang] reflect - Class.forName Date: Sun, 24 Nov 2002 00:46:32 -0500 User-Agent: KMail/1.4.1 References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200211240046.32271.steve.downey@netfolio.com> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N +1, as the reasoning seems quite sane. On Saturday 23 November 2002 09:17 pm, Henri Yandell wrote: > I've not really been paying attention to the reflect stuff, and had mis= sed > a question about it in a blog I usually read: > > http://radio.weblogs.com/0112098/2002/09/24.html#a114 > > Rather than using: > > Class theClass =3D Class.forName( className ); > > in reflect.ReflectionUtils, James suggests we should use: > > **** > Class theClass =3D null; > > try { > theClass =3D Thread.currentThread().getContextClassLoader().loadClass( > className ); > } catch (ClassNotFoundException e) { > theClass =3D getClass().getClassLoader().loadClass( className ); > } > **** > > as "Class.forName is evil". > > Any views on this?? > > Hen -- To unsubscribe, e-mail: For additional commands, e-mail: