Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Capture current value for set pointcut

Hi.

You have to use reflection:

Field field = getField(thisJoinPoint.getSignature());
			Object oldValue = field.get(o);

Eric

2008/6/16 Ashley Williams <ashley.williams@xxxxxx>:
> Hi,
>
> I would like to be able to inspect the current value of a field in addition
> to the value that is being assigned to it during the application of my
> advice. I am using the set pointcut designator in my advice and I can
> determine the name of the field using
> thisJoinPoint.getSignature().getName(), but not the value.
>
> This is for an automatic event mechanism where I need name, oldValue and
> newValue.
>
> Is this even possible?
>
> Thanks
> - Ashley
>
> ---
>
> This e-mail may contain confidential and/or privileged information. If you
> are not the intended recipient (or have received this e-mail in error)
> please notify the sender immediately and delete this e-mail. Any
> unauthorized copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden.
>
> Please refer to http://www.db.com/en/content/eu_disclosures.htm for
> additional EU corporate and regulatory disclosures.
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>



-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


Back to the top