Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Removing functionality with AspectJ?

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

 

 


Back to the top