Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] target == this?

Hi all,

I have a simple question concerning the execution PCD. Is it a fact that the
"this" object is always the same as the "target" object on the join points
captured by any pointcut using an execution PCD?

For example, is the output from the code:

  pointcut execanymethod(SomeClass c, SomeClass _c) : 
  	execution(* *.*()) 
	&& target(c) && this(_c);

  before(SomeClass c, SomeClass _c) : 
  	execanymethod(c, _c) {
  	if (c == _c) System.out.println("YES\n");
  }

, when there are interceptions on the aplication, always YES?

Thanks in advance,
Otavio


Back to the top