From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2099 invoked by alias); 22 Mar 2004 09:16:04 -0000 Mailing-List: contact mauve-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-discuss-owner@sources.redhat.com Received: (qmail 2090 invoked from network); 22 Mar 2004 09:16:00 -0000 Received: from unknown (HELO interway.li) (217.8.192.21) by sources.redhat.com with SMTP; 22 Mar 2004 09:16:00 -0000 Received: from [217.8.197.76] (HELO [192.168.1.33]) by interway.li (CommuniGate Pro SMTP 4.1.8) with ESMTP id 1341934; Mon, 22 Mar 2004 10:15:59 +0100 From: Sascha Brawer To: David Holmes , Chris Gray , Andrew Haley , Robert Lougher Cc: GNU Classpath , Subject: Re: ClassLoader.findLoadedClass (was: ServiceFactory) Date: Mon, 22 Mar 2004 09:16:00 -0000 Message-Id: <20040322091554.32760@smtp.mail.ch.easynet.net> In-Reply-To: <20040322081359.4021@smtp.mail.ch.easynet.net> References: <20040322081359.4021@smtp.mail.ch.easynet.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2004-q1/txt/msg00021.txt.bz2 Robert Lougher wrote on Mon, 22 Mar 2004 09: 03:12 +0000: >However, in the explicit case, the initiator has been lost -- >defineClass only has the defining loader, and we don't have an "add >initiating loader" call for use when we unwind. Even if findLoadedClass w= as >native so it could use the VM class cache, the VM wouldn't know that, using >your example, L1 initiated the load and would return null. Does this mean that the API specification for ClassLoader.findLoadedClass is incorrect? Or should it say that a VM may or may not record the fact that some ClassLoader has initiated the loading of a class? > protected final Class findLoadedClass(String=A0name) > > Returns the class with the given name if this loader has been recorded > by the Java virtual machine as an initiating loader of a class with > that name. Otherwise null is returned. http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ ClassLoader.html#findLoadedClass(java.lang.String) -- Sascha Sascha Brawer, brawer@dandelis.ch, http://www.dandelis.ch/people/brawer/