Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Stanimir Stamenkov Newsgroups: comp.lang.java.programmer Subject: Re: Create Dynamic Proxy for class instead of interface Date: Sun, 12 Jun 2011 17:40:28 +0300 Organization: A noiseless patient Spider Lines: 26 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 12 Jun 2011 14:40:19 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="VdcnnljfizG2LUdZ5iOA6g"; logging-data="26870"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9ZnbTNs1xa0zOSQMw2k6W" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20110608 SeaMonkey/2.1 In-Reply-To: X-Face: )>>ChyF_H http://en.wikipedia.org/wiki/Javassist > > I basically want to create a proxy augmenting an existing object > with additional interface. Is the Javassist library the right tool > for doing this? I've found javassist.util.proxy.ProxyFactory does exactly what I want: http://www.csg.is.titech.ac.jp/~chiba/javassist/html/javassist/util/proxy/ProxyFactory.html > Are there other similar tools? The javassist.util.proxy package documentation [1] mentions cglib: http://cglib.sourceforge.net/ Does anyone have experience with Javassis and/or cglib - is the one or the other better somehow? [1] http://www.csg.is.titech.ac.jp/~chiba/javassist/html/javassist/util/proxy/package-summary.html -- Stanimir