-
1. Re: Copying / Moving fabricated CtClass from one ClassPool t
hlship Aug 31, 2004 4:06 PM (in response to hlship)BTW ... it's for Javassist 2.6.
I have a solution that involves sharing the ClassPool. It seems to work. It does involve invoking the appendClassPath() method, which is not synchronized (I created a subclass of ClassPool that synchronized the method).
I'm somewhat concerned about what will happen in a complex classloader environment when there are conflicts between some of the classes. Testing will tell. -
2. Re: Copying / Moving fabricated CtClass from one ClassPool t
chiba Sep 3, 2004 1:24 PM (in response to hlship)Due to the problem you mentioned, I modified
the ClassPool architecture; Javassist 3.0 allows
cascading ClassPools as Java does ClassLoaders.
You can tell a ClassPool (B) to delegate to the
parent (A) if it does not find a class. -
3. Re: Copying / Moving fabricated CtClass from one ClassPool t
hlship Oct 4, 2004 1:22 PM (in response to hlship)I actually reorganized my code and found a way to continue using 2.6. I share a single class pool, but do some interesting work with a customized delegating class loader.
BTW ... I have to say that for many typical uses of Javassist, the wrapper services for it in HiveMind make it very, very easy. By typical use, I mean how Tapestry and HiveMind use Javassist: to create new classes at runtime (not modify existing classes). This is a small subset of Javassist, but a very useful one.
I just queried in the dev forum ... when will try...finally be supported? -
4. Re: Copying / Moving fabricated CtClass from one ClassPool t
chiba Nov 4, 2004 11:31 AM (in response to hlship)I just queried in the dev forum ... when will try...finally be supported?
I have just implemented try-finally and checked the code into the CVS.