I'm using AspectJ to advice all the public methods which do have an argument of a chosen class. I tried the following:
pointcut permissionCheckMethods(Session sess) :
(execution(public * *(.., Session)) && args(*, sess));
This is working wonderfully for methods with at least 2 arguments:
public void delete(Object item, Session currentSession);
but it does not work with methods like:
public List listAll(Session currentSession);
How may I change my pointcut to advice both methods executions? In other words: I expected the ".." wildcard to represent "zero or more arguments", but it looks like it means instead "one or more"...