generic way of getting class name
<p>Would what be a static equivalent of a dynamic </p>

<blockquote>
  <p>String CLASS_NAME = this.getClass().getCanonicalName()</p>
</blockquote>

<p>Note that the following is not what i'm looking for since it specifically refers to a particular class. I'd like to refer to class name outside of a method (ie in the static {} section)</p>

<blockquote>
  <p>static String CLASS_NAME = Foo.class.getCanonicalName()</p>
</blockquote>

<p>THanks.</p>
