Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] aspectj and call by reflection


Hi Andrew,
Thanks for the answer. Interesting. Now I understand why I was not able to intercept my calls.

First the post's answer doesn't work for my concern and tricky to "aspect" java native methods....;o))

 Maybe I can explain my concern and you have an advice:

My m.invoke(myObject, new Object[]{o});  call are essentially setters on business objects properties.
My goal is to "aspect" these setters calls in order to fire messages. Ok I can do it by inserting code in each setter in order to get the oldValue, the newValue,
use a propertyChangeSuppiort to fire a message. It's what I try to avoid. I just want to leave my business objects "as is" and use aspects to do the "plumbing" (oldValue, newValue, firing,...).

One idea can be to use a binding framework and use the ValueModel objects to do my messaging "plumbing"...

Thanks again for your help.




Internet
andrew.clement@xxxxxxxxx@eclipse.org - 09/08/2007 17:27
 

Please respond to aspectj-users@xxxxxxxxxxx

Sent by:        aspectj-users-bounces@xxxxxxxxxxx

To:        aspectj-users

cc:        

Subject:        Re: [aspectj-users] aspectj and call by reflection

Check the FAQ:

http://www.eclipse.org/aspectj/doc/released/faq.php#q:reflectiveCalls



On 09/08/07, gianfranco.oldani@xxxxxxxxxxxxxx
<gianfranco.oldani@xxxxxxxxxxxxxx> wrote:
>
> Hi,
>   I have cals to methods through reflection, e.g. :
>
> java.reflect.Method m = myObject.getMethod(....)
>
> and then
>
> m.invoke(myObject, new Object[]{o});
>
> This kind of call is not intercepted by my pointcut.
>
> Is it possible to intercept such call?
>
> Thanks for help
>
> This message and any attachments (the "message") is intended solely for the
> addressees and is confidential.
> If you receive this message in error, please delete it and immediately
> notify the sender. Any use not in accord with
> its purpose, any dissemination or disclosure, either whole or partial, is
> prohibited except formal approval.
> The internet can not guarantee the integrity of this message.
> BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for
> the message if modified.
> Do not print this message unless it is necessary, consider the environment.
>  ---------------------------------------------
> Ce message et toutes les pieces jointes (ci-apres le "message") sont etablis
> a l'intention exclusive de ses destinataires et sont confidentiels. Si vous
> recevez ce
> message par erreur, merci de le detruire et d'en avertir immediatement
> l'expediteur.
> Toute utilisation de ce message non conforme a sa destination, toute
> diffusion ou toute publication, totale ou partielle, est interdite, sauf
> autorisation expresse.
> L'internet ne permettant pas d'assurer l'integrite de ce message, BNP
> PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce
> message, dans l'hypothese ou il aurait ete modifie.
> N'imprimez ce message que si necessaire, pensez a l'environnement.
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top