AspectJ problem

Hi I am new to AspectJ and I would like to find out if creating variants of a class using Aspects - I will create another instance of the class as well?

13.10.2009 15:30:29
This question is very unclear, can you please restate it, explain in more detail what you are trying to do?
James Black 27.10.2009 13:26:55

I am guessing that the question is, if I am adding aspects would a new class be created.

The answer is no, as the weaving, either when compiling or at run-time, using AspectJ, will add the changes to the classes that are affected by the aspects, so there is no new class created, it is just that the byte code for the original class and the final class are different.

6.11.2009 00:46:57

What do you mean by variants? If you are asking if AspectJ instantiates copies of your class, the answer is no. AspectJ uses a design pattern called proxy to intercept calls to your class.

27.10.2009 13:23:07
Spring AOP uses a proxy. AspectJ will modify the bytecode, either by weaving in the changes, or as part of the compilation.
James Black 27.10.2009 13:26:11