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!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s