title: How the get the classOf for a scala object type
body: <p>I wonder how to get a class object for an object type in Scala. Ok, that is a mouth full because of the double meaning for object. So here an example which will fail:</p>
  
  <pre><code>object Main
  {
     private [this] val TAG = classOf [Main].getName;
  } // Main
  </code></pre>
  
  <p>If <code>Main</code> was class it works perfectly. Any ideas? </p>