StijnVB (1) [Avatar] Offline

I was wondering if it's possible to make a pointcut that handles method join points which contains certain code (ex: like a call to a method).
What I'm trying to get is the following:
I would like a pointcut that handles all methods who alter the state of an object, methods who contain the field write access join points.
For instance a pointcut that deals with all setters, constructors and other methods that alter the state of an object.
Is this possible?
Also is it possible to pointcut all methods who have a certain method call in their code?
For instance: a method
callPerson(Person p) {;
And I would like to pointcut all methods that have (this would pointcut the callPerson method).
Is this possible?

Greetings from a student in Belgium!
Stijn Van Bever
ps: your book is amasing! (I have both editions smilie )
ramnivas (171) [Avatar] Offline
Re: pointcut that handles method join points with certain code
Looks like auto-notification from this forum isn't working for me again.... hence I didn't see your question.

There isn't a way to write the kind of pointcuts you want. What is the use case you are trying to address. Perhaps, there is a solution in the context of a specific use case.