title: check if no parameters passed in groovy closure before calling it
body: <p>i use <code>maximumNumberOfParameters</code> to check  number of parameters used in closure ; </p>
  
  <pre><code>   def callerCls(Closure c){
       prinltn 'Nb :'+c.maximumNumberOfParameters;
        c();
    }
  </code></pre>
  
  <p>the pb that the follwing snippet has the same result .</p>
  
  <pre><code>  callerCls{
  
  
    }
   // and 
   callerCls{param1-&gt;
  
    }
  </code></pre>
  
  <p>Both of them return: </p>
  
  <pre><code>Nb :1
  </code></pre>
  
  <p><strong>Although</strong> the follwing code,  returns <code>Nb :2</code>. </p>
  
  <pre><code> callerCls{p1,p2-&gt;
  
        }
  </code></pre>
  
  <p>How to distinguish  closure where no parameter used (as the first snippet) ?</p>