<p>I'm using AspectJ to advice all the public methods which do have an argument of a chosen class. I tried the following:</p>

<pre><code>pointcut permissionCheckMethods(Session sess) : 
    (execution(public * *(.., Session)) &amp;&amp; args(*, sess));
</code></pre>

<p>This is working wonderfully for methods with at least 2 arguments:</p>

<pre><code>public void delete(Object item, Session currentSession);
</code></pre>

<p>but it does not work with methods like:</p>

<pre><code>public List listAll(Session currentSession);
</code></pre>

<p>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"...</p>

Oh well... I worked that around with this nasty trick. Still waiting for someone to show up with an "official" pointcut definition.
```
```
pointcut permissionCheckMethods(EhealthSession eheSess) : 
    (execution(public * *(.., EhealthSession)) && args(*, eheSess))
    && !within(it.___.security.PermissionsCheck);

pointcut permissionCheckMethods2(EhealthSession eheSess) : 
    (execution(public * *(EhealthSession)) && args(eheSess))
    && !within(it.___.security.PermissionsCheck)
    && !within(it.___.app.impl.EhealthApplicationImpl);

before(EhealthSession eheSess) throws AuthorizationException : permissionCheckMethods(eheSess)
{
    Signature sig = thisJoinPointStaticPart.getSignature(); 
    check(eheSess, sig);
}

before(EhealthSession eheSess) throws AuthorizationException : permissionCheckMethods2(eheSess)
{
    Signature sig = thisJoinPointStaticPart.getSignature(); 
    check(eheSess, sig);
}
```
```