| [aspectj-users] Use null for args in pointcut |
protected
abstract pointcut subjectChange(Subject s, Object args);One of the aspects which extends this super aspect does not require the 'args' parameter.
My overriding pointcut looks like :
protected
pointcut subjectChange(Subject subj, Object arg) :(
call(* Pot.add(..))
||
call(* Pot.refresh())
)
&& !within(PotObserverUtilTest)
&& target(subj)
&& args(arg);
This pointcut matches the Pot.add method, since it does have an argument. However the Pot.refresh() method is not advised since it does not have any arguments. I have to override the abstract pointcut.
Is there any way to get the Pot.refresh() advised in this scenario? (args = null?)
Any advice gratefully appreciated,
Fintan