[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?
|
- From: "Andrew Eisenberg" <andrew@xxxxxxxxxxxx>
- Date: Mon, 13 Oct 2008 20:53:14 -0700
- Delivered-to: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :sender:to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=55GwANZcEBIIO3xxdcfqovIqtS6eiEg/FV3oqDune2E=; b=tY5IMn53Xlnu0SWXsuUAsSJGDFamRvWPy64QIMLdff63e8grmFfahoIMK8PGKPx0lA 5v/VusUIsJNbIacGpqLVn0YNDybYZEYrYddBvKrDPjCU9qEjit3sIukXqOE7+ply10sL 93cYIT4/PpKuySUYIIvUMH+U8PLcVgH/OoU2c=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=l/EzL+FK9Lix6AqlJ1qO4G7C9xVq+JdKCO+lAWKlBtdxYiV1titq1W0xEfhxloj1ua jCBdvW0Av+6eOGt+ADnFdX+L9vlcgy6KfUFEMcZOWyl6r375BiDx78oBOOW3UDZgyXZx YL1TnBgvNyVwLeJy8NnEvP3xYWryljKuXIacs=
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
>