Skip to main content

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

Hi Christian,

I'd like to make a suggestion. Create learning tests with my framework
ajUnit. These are the kind of questionyou can answer yourself by
creating an appropriate test.

You can find my testing framework here: https://github.com/loddar/ajunit

And example projects for quick setup here:
https://github.com/loddar/ajunit-examples

Kind regards

Marko
> 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
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


-- 
Visit ajUnit @ https://github.com/loddar/ajunit



Back to the top