Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] How to get the object from which the call was made?

This: should do what you want it to:

pointcut mouseMoved(AbsoluteMouse mouse):
       call(void InputAction.performAction(*))
       && this(mouse);


On Mon, Oct 13, 2008 at 4:02 PM, rikland <asdf@xxxxxxxxxxxxx> wrote:
>
> Hi!
>
> In my case, there is a type AbsoluteMouse which has an object xUpdateAction
> of type InputAction.
>
> InputAction has a method called performAction().
>
> I need to create a pointcut when performAction is called within
> AbsoluteMouse.
>
> I also need to get the AbsoluteMouse object on which that call was made.
>
> I have tried to write something like that here, but I don't think this will
> work:
>
> pointcut mouseMoved(AbsoluteMouse mouse):
>        call(void InputAction.performAction(*))
>        && within(AbsoluteMouse)
>        && target(mouse);
>
>
> after(AbsoluteMouse mouse) returning: mouseMoved(mouse) {
>                //do stuff using mouse
>        }
> }
>
> How do I get the object from which the call was made?
> --
> View this message in context: http://www.nabble.com/How-to-get-the-object-from-which-the-call-was-made--tp19960943p19960943.html
> Sent from the AspectJ - users mailing list archive at Nabble.com.
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top