Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Beginner's questions: (How) Do these pointcuts differ?

Hi all,

I have a few more questions, this time regarding this example:
https://eclipse.org/aspectj/doc/released/progguide/examples-basic.html#examples-joinPoints

What's the difference between
  pointcut demoExecs(): within(Demo) && execution(* *(..));
and
  Pointcut demoExecs() : execution(* Demo.*(..));
Is there any?

Isn't joining execution(void go()) && !execution(* go()) leaving you
with an empty intersection in the following example?
  pointcut goCut(): cflow(this(Demo) && execution(void go()));
  pointcut demoExecs(): within(Demo) && execution(* *(..));
  Object around(): demoExecs() && !execution(* go()) && goCut()

Is the difference between
  pointcut goCut(): cflow(this(Demo) && execution(void go()));
and
  Pointcut gocut(): execution(void Demo.go());
that the first means go() got kicked off by Demo, whereas the second
line might have been kicked off from the outside (go() is default
protected)?

Kind regards,
Christian


Back to the top