AspectJ problem

Hi I'm new to AspectJ and I would like to know if variants of the class are created using Aspects - will I create another instance of the class as well?

+2


source to share


2 answers


I guess the question is if I add aspects a new class will be created.



The answer is no, since weaving, either at compile time or at runtime using AspectJ, will add changes to the classes that are affected by the aspects, so there is no new class created, the byte code for the source class and the final class are different.

+1


source


What do you mean by options? If you are asking if AspectJ creates copies of your class, the answer is no . AspectJ uses a design pattern called proxy

to intercept calls to your class.



0


source







All Articles