Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Handling Exception while accesing Instance variable

Does the get pointcut not do what you want?

 pointcut handle() : call( public *  com.lfg.edm..*.get*(..)) ||
get(public * com.lfg.edm..*.*);

Andy.
2008/7/13 vinodh subbiah <vinodhts@xxxxxxxxxxxxxx>:
> Hi All,
> Im using Aspect J 1.5 and I need to write a pointcut to handle exceptions
> while accessing .
> So i come up with a point cut like one below
> pointcut handle() : call( public *  com.lfg.edm..*.get*(..));
>
> This one works fine if they call using the getter methods.
>
> Now if i have a method like
> getX().getY().getZ();
> All of these type of access are now handled with my pointcut
> But can anyone help me to define the same pointcut when the user tries to
> access the object like below
>
>   Policy policy =  x.y.z ;
>   Assume all the fields are public and so you can access with x.y.z.
>
> Thanks for your help in advance
>
> Vinodh Subbiah,
> 580 Laforet Street,Apt 14
> Windsor N9C3G8
> Canada
> Ph 519-971-7847
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


Back to the top