Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] how much is dynamic?

Luca,

You should now read the help pages that come with the 1.1.X release of AspectJ. They have more details and updated information.

You can compile from source, using "ajc" like javac. In 1.1, you can now use ajc to weave-in aspects into existing byte code. So, you don't have to recompile your sources. You can even create jar files of pre-compiled aspects and weave them later.

In a sense, the 1.1 byte-code support is like old-style linking. This step is necessary so ajc can manipulate the advised classes as needed before they are loaded by the JVM.

Hope this helps a bit.

dean

Luca Ferrari wrote:

Hello to everyone,
I'm new to the AspectJ world, hence my questions could be trivial. If so please apologize myself, I'm just trying to understand. I've read the paper "An overview of AspectJ" and I cannot understand if the aspect weaver is dynamic or not. IN the paper the author talks about an aspect compiler, but is it a compiler at the same level of the javac compiler? I mean : is it possible to take a (ordinary) compiled class and load it (into a running JVM) "attaching" aspetcs to it, or I need to recompile the class starting from the source? I know that the main advantage of aspects is to fuse crosscuts without requiring source code alerations, but my question is related to the use of apsect starting from an alredy compiled class.

Thanks,
Luca


--
Dean Wampler, Ph.D.
Aspect Programming
dean@xxxxxxxxxxxxxxxxxxxxx <mailto:dean@xxxxxxxxxxxxxxxxxxxxx>
http://www.aspectprogramming.com




Back to the top