title: How do I dynamically invoke static methods (given as MetaMethod objects) in Groovy
body: <p>As an example, let's take one of StringUtils' methods:</p>
  
  <pre><code>def isEmptyMethod = StringUtils.metaClass.getMetaMethod("isEmpty", String)
  </code></pre>
  
  <p>Once I have this method, I can invoke it like this:</p>
  
  <pre><code>isEmptyMethod.invoke(null, 'some string')
  </code></pre>
  
  <p>Is this the proper way to invoke static metamethods? The null argument doesn't seem right, but I can't find a "cleaner" way to do this.</p>
  
  <p>EDIT: I see this as one of the answers for the question cfrick likned, but I'm still not convinced about the 'null' parameter...</p>