AOP using AspectJ

Even though I had heard about AOP, I didn’t take it seriously. I thought it was meant for Enterprise applications usage like Transaction management, logging etc. But recently I was faced with a problem - how to know an Object’s state changes in Java. As you know state of an Object is its properties, so what I want is to know when the state changes. I didn’t quite get what to do about it, and so posted in stackoverflow. And the answer was to use AspectJ!

Here is the link to SO - http://stackoverflow.com/q/16352838/952511

To do AspectJ development in Eclipse we have to install AJDT(AspectJ Development Tools). Just add the correct URL from http://www.eclipse.org/ajdt/downloads/ for the Eclipse version we are using, to ‘Install New Software’ in Help menu and install AJDT n its tools from the list.

And now am learning AspectJ - joinpoints and pointcuts!

Share Comments
comments powered by Disqus