user3797438
user3797438

Reputation: 485

Aspectj concept in eclipse

Hi I am new to aspectj and after several hours of browsing around the internet I came to know something about aspectj. And also I had one doubt is this similar to immediate window in visual studio as in the aspectj in which we doing manually checking joint points...In immediate window if we type any variable it returns its value in current method. Likewise, in aspectj we are declaring manually that after calling specified function and returing variable values inside that method using system.out.println(). Is that right? if it is wrong...correct me

Upvotes: 0

Views: 51

Answers (1)

Leon
Leon

Reputation: 12481

From the wikipeida article: AOP is a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns

Think about caching.... that is a concern that cuts across other concerns, like reading from a datastore. You can create a point cut to cache values being written to datastore and one to read from cache when the datastore is being accessed. Here is a link to a question specifically about AOP use cases: AOP use cases?

If you want to use AOP to "watch" a variable, to short answer is you can't. Pointcuts can only be applied methods

Upvotes: 1

Related Questions