Oct 11th, 2012, 03:54 AM
Matching against specific methods from classes from multiple packages
I am trying to write a pointcut expression that will allow a method in an aspect class to be invoked based upon matching a variable class structure & specific method names. An example of what I'm trying to achieve is as follows:
Classes to be matched on by pointcut expression:
I have tried the following pointcut expressions (which don't appear to work):
I have also thought about making all the DAOs extend an abstract class which in turn implements and interface and writing a rule based upon this, but I'd appreciate knowing if I can write a generic pointcut expression which can do regular expression matching on the beginning and ending of package structures, combined with a regular expression on the class name and a named method i.e. add?
Appreciate your advise.