Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.lang.java.programmer > #5240

Re: Create Dynamic Proxy for class instead of interface

From Stanimir Stamenkov <s7an10@netscape.net>
Newsgroups comp.lang.java.programmer
Subject Re: Create Dynamic Proxy for class instead of interface
Date 2011-06-12 17:40 +0300
Organization A noiseless patient Spider
Message-ID <it2j4j$q7m$1@dont-email.me> (permalink)
References <it2hld$h99$1@dont-email.me>

Show all headers | View raw


Sun, 12 Jun 2011 17:15:17 +0300, /Stanimir Stamenkov/:

> 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

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Create Dynamic Proxy for class instead of interface Stanimir Stamenkov <s7an10@netscape.net> - 2011-06-12 17:15 +0300
  Re: Create Dynamic Proxy for class instead of interface Stanimir Stamenkov <s7an10@netscape.net> - 2011-06-12 17:40 +0300
    Re: Create Dynamic Proxy for class instead of interface Robert Klemme <shortcutter@googlemail.com> - 2011-06-12 19:07 +0200
      Re: Create Dynamic Proxy for class instead of interface Stanimir Stamenkov <s7an10@netscape.net> - 2011-06-12 20:42 +0300
  Re: Create Dynamic Proxy for class instead of interface Tom Anderson <twic@urchin.earth.li> - 2011-06-13 11:58 +0100

csiph-web