Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Weaving core Java classes

On Wed, 26 Mar 2008, Hendrik wrote:

Eric Bodden wrote:

>   2. Can we take out the woven code from the rt.jar? (I personally think
>   it's not possible due to the complexity of the involved tasks)

 You you wish to identify the classes that were actually changed and
 only extract those?

Yes, ideally the woven classes should only get used for my application and should not affect other applications. So what I wanted to do was to put back the default classes into rt.jar after finishes running the application.

In our project @java (http://www.disi.unige.it/person/CazzolaW/atjava.html) we have patched the standard reflection library by extracting the
classes from the rt.jar applying the aspects on them and re-archiving
them in the rt.jar. There is a problem in this solution: rt.jar is a
sealed package i.e., it can't rely on something outside the jar itself
so you have to include also the aspect and the libraries you need (if
any) in the new archive. Anyway, but the junk we have to put in the jar,
this solution works.

But I think I got the solution while typing this email, it's probably
better to put the woven classes in a separate jar and then we can
include or exclude this jar from the bootstrap class path at will.

I admit that at that time I didn't think about this opportunity but I'm
not convinced that the class path helps in hiding the original
implementation of the system classes. In my view the loader should
prevent this kind of obfuscation at least for the system classes.

Just my 2¢ I hope this helps.

Best,
Walter

--
Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
E-mail cazzola@xxxxxxxxxxxxx Ph.: +39 010 353 6637  Fax: +39 010 353 6699
· · · --------------------------- · · · --------------------------- · · ·
               ... recursive: adjective, see recursive ...
· · · --------------------------- · · · --------------------------- · · ·

Back to the top