Re: [aspectj-users] Policy enforcement for setter and getter methods aspectj

2011-05-16 Thread Manuel Menezes de Sequeira
Hi Andy, One may solve the problem through the introduction of annotations @Setter and @Getter, which admittedly also makes the code more expressive. Regards, Manuel On Mon, May 16, 2011 at 15:51, Andy Clement wrote: > Hi John, > > Basically you are interested in a set() or a get() when it is

Re: [aspectj-users] Policy enforcement for setter and getter methods aspectj

2011-05-16 Thread Andy Clement
Hi John, Basically you are interested in a set() or a get() when it is not withincode() of a getter or setter (or likely constructor). The problem is that you can't tie the methods name and the fields name together, so you either have to specify a completely wild policy: declare warning: get(* X

[aspectj-users] Policy enforcement for setter and getter methods aspectj

2011-05-15 Thread John
I have a doubt again. I need to enforce a policy that issues a warning when a variable's value is accessed without using its corresponding setters and getters. Not even sure where to start on this one -- View this message in context: http://aspectj.2085585.n4.nabble.com/Policy-enforcem