title: How to pass an anonymous Class (not an instance) as a parameter to a method expecting type Class in Java
body: <p>I have to call a method that takes a <code>Class</code> parameter:</p>
  
  <pre><code>public action(Class&lt;? extends SomeInterface&gt; classVariable);
  </code></pre>
  
  <p>I am able to do this:</p>
  
  <pre><code>action(new SomeInterface() { 
      // implement interface
    }.getClass());
  </code></pre>
  
  <p>But, can I get away without instantiating the object and calling the <code>getClass()</code>? </p>