AspectJ-1.1
implements weaving only at the bytecode level. There is no intermediate
source code for you to look at. If you want to examine the generated
code you can either use javap if you like looking at java bytecode or you can
run a java disassembler such as jad on the generated .class files. We’d
love to support the old source code weaving form, but it would be about twice
as much engineering work to implement the weaver to operate on both bytecode
and source.
We get three
advantages from the switch to operating on bytecode in 1.1. Aspects can
apply to .jar files for which source may be unavailable, aspect weaving can be
done at load time in custom ClassLoaders, and our weaving implementation can
be cleanly separated out into a back-end for the eclipse compiler minimizing
coupling between the compiler and the weaver.
Erik Hilsdale and I
just finished writing a paper that describes much of AspectJ’s weaving
architecture and looks into the performance impact of AspectJ both on compile
times and on the generated code. This paper is the first one on my web
site at http://hugunin.net/papers.html.
-Jim
From:
aspectj-users-admin@xxxxxxxxxxx [mailto:aspectj-users-admin@xxxxxxxxxxx]
On Behalf Of Trishan de
Lanerolle
Sent: Monday,
November 03, 2003 8:22 PM
To:
aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] Aspect
Weaver
Thanks for the previous
information on the use. One hurdle that we have come across is the changes
made to version 1.1 from 1.0 where the byte code weaving was introduced.
We would like to see the weaved source code. We need to see the intermediate
weaved code. Is there a command or option in 1.1.1 to do this. I am new
to AspectJ and I appologise in advance if the answer is staring
me in the face. If so this would eliminate a major hurdle. We are
concerned about the code overhead the weaved code adds on. Some of the
project build time goes in to several hours and we hope that the
introduced Aspects don't significantly add on to this. We hope to test
this out as well. Our architects want to see what effect the
introduced point cuts and aspects have on the source code. Any advice would be
appreciated.