Return-Path: Delivered-To: apmail-incubator-geronimo-dev-archive@incubator.apache.org Received: (qmail 80349 invoked by uid 500); 25 Aug 2003 06:29:29 -0000 Mailing-List: contact geronimo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: geronimo-dev@incubator.apache.org Delivered-To: mailing list geronimo-dev@incubator.apache.org Received: (qmail 80220 invoked from network); 25 Aug 2003 06:29:27 -0000 Received: from main.gmane.org (80.91.224.249) by daedalus.apache.org with SMTP; 25 Aug 2003 06:29:27 -0000 Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19rAYK-0005C5-00 for ; Mon, 25 Aug 2003 08:10:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: geronimo-dev@incubator.apache.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19rAGu-00052y-00 for ; Mon, 25 Aug 2003 07:52:08 +0200 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 19rAG4-0001qS-00 for ; Mon, 25 Aug 2003 07:51:16 +0200 From: Chris Nokleberg Subject: Re: [bcel] Is anyone a BCEL expert? Date: Sun, 24 Aug 2003 22:51:49 -0700 Lines: 35 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en In-Reply-To: Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, I see someone already mentioned CGLIB, but thought I'd throw in my two cents anyway. Dain Sundstrom wrote: > Interface proxy generator -- This is a copy of java.reflection.Proxy. > Why do we need a copy? Well I think it is a good starting point for > the rest of the stuff, and I know we can do it better. I would like > the proxy generator to be able to generate class names that have some > meaning other then Proxy$24, and I think we can write code that this > faster. See net.sf.cglib.Enhancer. It is a very useful general tool, but for performance sometimes it is better to use something more tailored to your specific need. > Dynamic instance factory See net.sf.cglib.ConstructorProxy, it can do exactly what you describe (but without the argument restriction). > Abstract class proxy generator -- We need this for the CMP 2.x > implementation. The Enhancer will handle this use case. > Field interception -- This will make CMP 1.x much easier to implement. This will require a different technique as it requires hooking into the ClassLoader. It probably is possible to add the necessary hooks to CGLIB, but IMO it is not the right tool for this particular task. Chris