An around advice which does not call proceed() would to it.
On 11/5/07, Rob Austin <[EMAIL PROTECTED]> wrote: > Hi there, > > I'm completely new to AspectJ and was wondering if there is anyway to cause > a method to be "skipped" with AspectJ. > > Apologies if the question sounds silly, but I am using AspectJ to monitor > what is going on in an object for security purposes. > > If certain conditions have been met, a rule engine implemented in a before > advice determines that the code in that method should be skipped. Naturally, > for this to be in anyway feasible, the method in question would need not to > return anything, something like > > public void action() > > I guess I need something like a decorator pattern that removes > functionality rather than adds it. The only way I can currently think do to > this is to use my aspect to change the value of a boolean variable in the > target method which causes the code to exit without doing anything. > > Really appreciate your help > > Thanks > > Rob > > > > > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > > _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
